[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) <las@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user