details: https://code.tryton.org/tryton/commit/99b258e3f056
branch: default
user: Cédric Krier <[email protected]>
date: Fri Jan 23 12:12:27 2026 +0100
description:
Always set a value for invoice line unit from UBL invoice and credit
note
The search for similar line needs to test if the unit has a value or
not.
Closes #14544
diffstat:
modules/edocument_ubl/edocument.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 494190e98054 -r 99b258e3f056 modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py Thu Jan 22 17:41:04 2026 +0100
+++ b/modules/edocument_ubl/edocument.py Fri Jan 23 12:12:27 2026 +0100
@@ -339,6 +339,8 @@
raise InvoiceError(gettext(
'edocument_ubl.msg_unit_not_found',
code=unit_code))
+ else:
+ line.unit = None
else:
line.quantity = 1
line.unit = None
@@ -512,6 +514,8 @@
raise InvoiceError(gettext(
'edocument_ubl.msg_unit_not_found',
code=unit_code))
+ else:
+ line.unit = None
else:
line.quantity = -1
line.unit = None