diff --git a/export_invoice_edi_auchan/models/account_move.py b/export_invoice_edi_auchan/models/account_move.py index 31cf60da..e565d6c7 100644 --- a/export_invoice_edi_auchan/models/account_move.py +++ b/export_invoice_edi_auchan/models/account_move.py @@ -24,16 +24,23 @@ class AccountMove(models.Model): related="partner_id.is_edi_exportable", ) + def _find_bl_info(self): + """Find entête "Numéro de BL" and date""" + raise NotImplementedError + def _prepare_export_data(self, idx): self.ensure_one() res = [] source_orders = self.line_ids.sale_line_ids.order_id + bl_nbr, bl_date = self._find_bl_info() # Segment Entete facture res.append( ENTSegment( **{ "invoice": self, "source_orders": source_orders, + "bl_nbr": bl_nbr, + "bl_date": bl_date, } ).render() ) diff --git a/export_invoice_edi_auchan/schema/invoice_line.py b/export_invoice_edi_auchan/schema/invoice_line.py index c57be753..cbb7e408 100644 --- a/export_invoice_edi_auchan/schema/invoice_line.py +++ b/export_invoice_edi_auchan/schema/invoice_line.py @@ -55,7 +55,6 @@ def get_values(self): or 0.0, ), # Prix unitaire brut (1,), - (1,), (70, self.line.name, {"truncate_silent": True}), (17, self.line.price_subtotal), # Montant Net Ht de la ligne ] diff --git a/export_invoice_edi_auchan/schema/invoice_taxes.py b/export_invoice_edi_auchan/schema/invoice_taxes.py index 87d31528..c259d093 100644 --- a/export_invoice_edi_auchan/schema/invoice_taxes.py +++ b/export_invoice_edi_auchan/schema/invoice_taxes.py @@ -12,5 +12,10 @@ def get_values(self): (3, "TVA"), # Étiquette de segment "TVA" (5, self.tax_line.tax_line_id.amount or 0.0), (10, self.tax_line.tax_base_amount or 0.0), - (10, self.tax_line.credit or 0.0), + ( + 10, + self.tax_line.amount_currency + and abs(self.tax_line.amount_currency) + or 0.0, + ), ]