details: https://code.tryton.org/tryton/commit/446674dfc2a1
branch: 7.8
user: Cédric Krier <[email protected]>
date: Thu Jan 01 15:50:55 2026 +0100
description:
Do not set SellersItemIdentification UBL tag if product has no code
PEPPOL-EN16931-R008: Document MUST not contain empty elements.
Closes #14458
(grafted from facb964528f0fd71cc09e06cc7d063b8f814c2a1)
diffstat:
modules/edocument_ubl/template/2/CreditNote.xml | 2 +-
modules/edocument_ubl/template/2/Invoice.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r df57f2c9c4d6 -r 446674dfc2a1
modules/edocument_ubl/template/2/CreditNote.xml
--- a/modules/edocument_ubl/template/2/CreditNote.xml Mon Dec 29 15:58:40
2025 +0100
+++ b/modules/edocument_ubl/template/2/CreditNote.xml Thu Jan 01 15:50:55
2026 +0100
@@ -97,7 +97,7 @@
<cbc:Description
py:if="line.description">${line.description}</cbc:Description>
<cbc:Name>${line.product_name or line.summary}</cbc:Name>
<py:if test="line.product">
- <cac:SellersItemIdentification>
+ <cac:SellersItemIdentification py:if="line.product.code">
<cbc:ID>${line.product.code}</cbc:ID>
</cac:SellersItemIdentification>
<py:with vars="gtin=line.product.identifier_get(['ean', 'isbn',
'ismn'])">
diff -r df57f2c9c4d6 -r 446674dfc2a1
modules/edocument_ubl/template/2/Invoice.xml
--- a/modules/edocument_ubl/template/2/Invoice.xml Mon Dec 29 15:58:40
2025 +0100
+++ b/modules/edocument_ubl/template/2/Invoice.xml Thu Jan 01 15:50:55
2026 +0100
@@ -97,7 +97,7 @@
<cbc:Description
py:if="line.description">${line.description}</cbc:Description>
<cbc:Name>${line.product_name or line.summary}</cbc:Name>
<py:if test="line.product">
- <cac:SellersItemIdentification>
+ <cac:SellersItemIdentification py:if="line.product.code">
<cbc:ID>${line.product.code}</cbc:ID>
</cac:SellersItemIdentification>
<py:with vars="gtin=line.product.identifier_get(['ean', 'isbn',
'ismn'])">