From 9fed5ebe8f029e7de9f46b4b8bbc9056e672c1bf Mon Sep 17 00:00:00 2001 From: Yolann Sabaux Date: Tue, 13 Jun 2023 09:16:15 +0000 Subject: [PATCH] [FIX] account_edi_ubl_cii: exclude note-section Steps to reproduce: - Install the lux localization - Configure Peppol for a customer: Select a customer > tab accounting > under "electronic invoicing": format: Peppol BIS Billing 3.0 Peppol e-address: 0130 - Directorates of the European Commission Peppol Endpont: testendpoint - Create an invoice for the peppol customer - Add a section or a note in the Invoice - Confirm the Invoice Issue: Raise user error: Odoo requires a tax for EACH LINE, instead of each product Solution: Exclude the section/note line opw-3354757 closes odoo/odoo#126312 X-original-commit: fb716296dbdb4921d26ebe1c3a420965f07d61e4 Signed-off-by: Laurent Smet (las) --- addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py index 2dea16d9129..3482d46c482 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py +++ b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py @@ -304,7 +304,7 @@ class AccountEdiXmlUBLBIS3(models.AbstractModel): ) if intracom_delivery else None, } - for line in invoice.invoice_line_ids: + for line in invoice.invoice_line_ids.filtered(lambda x: x.display_type not in ('line_note', 'line_section')): if len(line.tax_ids.flatten_taxes_hierarchy().filtered(lambda t: t.amount_type != 'fixed')) != 1: # [UBL-SR-48]-Invoice lines shall have one and only one classified tax category. # /!\ exception: possible to have any number of ecotaxes (fixed tax) with a regular percentage tax