details: https://code.tryton.org/tryton/commit/802f5bcb434c
branch: 7.8
user: Cédric Krier <[email protected]>
date: Fri Jan 23 15:29:07 2026 +0100
description:
Set the invoice type on invoice line from UBL invoice
The invoice type is needed to set the right account from the product.
Closes #14547
(grafted from 3134b59848ef4901523e4bbc9c7c5c95ec82713c)
diffstat:
modules/edocument_ubl/edocument.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r cd54f817d414 -r 802f5bcb434c modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py Fri Jan 23 13:02:19 2026 +0100
+++ b/modules/edocument_ubl/edocument.py Fri Jan 23 15:29:07 2026 +0100
@@ -351,7 +351,8 @@
account_configuration = AccountConfiguration(1)
- line = Line(type='line', company=company, currency=currency)
+ line = Line(
+ type='line', company=company, currency=currency, invoice_type='in')
if (invoiced_quantity := invoice_line.find('./{*}InvoicedQuantity')
) is not None:
line.quantity = float(invoiced_quantity.text)
@@ -526,7 +527,8 @@
account_configuration = AccountConfiguration(1)
- line = Line(type='line', company=company, currency=currency)
+ line = Line(
+ type='line', company=company, currency=currency, invoice_type='in')
if (credited_quantity := credit_note_line.find('./{*}CreditedQuantity')
) is not None:
line.quantity = -float(credited_quantity.text)