details: https://code.tryton.org/tryton/commit/f2755cd1233c
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jan 15 18:13:06 2026 +0100
description:
Use document namespace and local name to calculate the document type
for Peppyrus
Closes #14503
diffstat:
modules/edocument_peppol_peppyrus/edocument.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 8303dd50b421 -r f2755cd1233c
modules/edocument_peppol_peppyrus/edocument.py
--- a/modules/edocument_peppol_peppyrus/edocument.py Wed Jan 14 14:39:08
2026 +0100
+++ b/modules/edocument_peppol_peppyrus/edocument.py Thu Jan 15 18:13:06
2026 +0100
@@ -171,11 +171,12 @@
return 'cenbii-procid-ubl::' + tree.findtext('.//{*}ProfileID')
def _peppyrus_document_type(self, type, tree):
+ root = tree.getroot()
+ namespace = root.nsmap.get(root.prefix)
if type == 'bis-billing-3':
return (
'busdox-docid-qns::'
- 'urn:oasis:names:specification:ubl:'
- 'schema:xsd:Invoice-2::Invoice##'
+ f'{namespace}::{etree.QName(root).localname}##'
+ tree.findtext('.//{*}CustomizationID') + '::2.1')
@peppyrus_api