-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves without partner_id are not sent to Upflow anymore
- Loading branch information
1 parent
012714f
commit 92a2dc1
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Copyright 2023 Foodles (https://www.foodles.com/) | ||
# @author Pierre Verkest <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
import logging | ||
|
||
from odoo.addons.component.core import Component | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
class BaseUpflowEventListner(Component): | ||
|
||
|
@@ -37,6 +39,9 @@ def send_moves_to_upflow(self, moves): | |
# depends are not computed yet better to refresh value | ||
moves._compute_upflow_type() | ||
for move in moves: | ||
if not move.upflow_commercial_partner_id: | ||
log.warning("No Upflow commercial partner found for move %s, ignoring", move) | ||
continue | ||
exchange_type, pdf_exchange = move.mapping_upflow_exchange().get( | ||
move.upflow_type, | ||
( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters