Skip to content

Commit

Permalink
account_invoice_ubl: exclude note lines in UBL
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaudoux committed Dec 4, 2024
1 parent 3286ddc commit 378e794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion account_invoice_ubl/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Generate UBL XML file for customer invoices/refunds",
"author": "Akretion,Onestein,Odoo Community Association (OCA)",
"author": "Akretion,Onestein,BCIM,Odoo Community Association (OCA)",
"maintainers": ["jbaudoux"],
"website": "https://github.com/OCA/edi",
"depends": [
"account_einvoice_generate",
Expand Down
5 changes: 4 additions & 1 deletion account_invoice_ubl/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ def generate_invoice_ubl_xml_etree(self, version="2.1"):
self._ubl_add_legal_monetary_total(xml_root, ns, version=version)

line_number = 0
for iline in self.invoice_line_ids:
invoice_lines = self.invoice_line_ids.filtered(
lambda line: line.display_type not in ("line_note", "line_section")
)
for iline in invoice_lines:
line_number += 1
self._ubl_add_invoice_line(
xml_root, iline, line_number, ns, version=version
Expand Down

0 comments on commit 378e794

Please sign in to comment.