Skip to content

Commit

Permalink
improve source order check with search on origin
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Jun 11, 2024
1 parent 72cde28 commit 051be08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion export_invoice_edi_auchan/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def _prepare_export_data(self, idx):
self.ensure_one()
_logger.info(f"Exporting {self.name}")
res = []
source_orders = self.line_ids.sale_line_ids.order_id
source_orders = self.line_ids.sale_line_ids.order_id or self.env[
"sale.order"
].search([("name", "=", self.invoice_origin)])
bl_nbr, bl_date = self._find_bl_info()
self = self.with_context(export_auchan_errors=[])
# Segment Entete facture
Expand Down

0 comments on commit 051be08

Please sign in to comment.