details: https://code.tryton.org/tryton/commit/12b888cc1b17
branch: 7.8
user: Cédric Krier <[email protected]>
date: Wed Jan 14 14:39:08 2026 +0100
description:
Use root prefix to retrieve the namespace of UBL document
Closes #14490
(grafted from 8303dd50b421a411d548e6f33505294876fa2ef2)
diffstat:
modules/edocument_ubl/edocument.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 74a98e6f19b6 -r 12b888cc1b17 modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py Tue Jan 13 20:08:43 2026 +0100
+++ b/modules/edocument_ubl/edocument.py Wed Jan 14 14:39:08 2026 +0100
@@ -200,7 +200,7 @@
tree = etree.parse(BytesIO(document))
root = tree.getroot()
- namespace = root.nsmap.get(None)
+ namespace = root.nsmap.get(root.prefix)
invoice, attachments = cls.parser(namespace)(root)
invoice.save()
invoice.update_taxes()