details: https://code.tryton.org/tryton/commit/a5ec3c1e6c37
branch: default
user: Cédric Krier <[email protected]>
date: Fri Feb 13 18:27:14 2026 +0100
description:
Add UNCL4461 code to invoice payment mean
diffstat:
modules/edocument_unece/CHANGELOG | 1 +
modules/edocument_unece/account.py | 22 ++++++++++++++++++++++
modules/edocument_unece/tryton.cfg | 6 ++++++
3 files changed, 29 insertions(+), 0 deletions(-)
diffs (57 lines):
diff -r 221bab7434f5 -r a5ec3c1e6c37 modules/edocument_unece/CHANGELOG
--- a/modules/edocument_unece/CHANGELOG Fri Feb 13 14:22:58 2026 +0100
+++ b/modules/edocument_unece/CHANGELOG Fri Feb 13 18:27:14 2026 +0100
@@ -1,3 +1,4 @@
+* Add UNCL4461 code to invoice payment mean
* Add allowance, charge and special service code
Version 7.8.0 - 2025-12-15
diff -r 221bab7434f5 -r a5ec3c1e6c37 modules/edocument_unece/account.py
--- a/modules/edocument_unece/account.py Fri Feb 13 14:22:58 2026 +0100
+++ b/modules/edocument_unece/account.py Fri Feb 13 18:27:14 2026 +0100
@@ -132,3 +132,25 @@
if not tax or getattr(tax, field) != getattr(self, field):
value[field] = getattr(self, field)
return value
+
+
+class InvoicePaymentMean(metaclass=PoolMeta):
+ __name__ = 'account.invoice.payment.mean'
+
+ @property
+ def unece_code(self):
+ "UNCL4461"
+ if self.instrument.__name__ == 'bank.account':
+ if self.invoice.type == 'out':
+ return '30'
+ else:
+ return '31'
+ elif self.instrument.__name__ == 'party.party.reception_direct_debit':
+ process_method = self.instrument.journal.process_method
+ if process_method == 'sepa':
+ if self.invoice.type == 'in':
+ return '58'
+ else:
+ return '59'
+ else:
+ return '49'
diff -r 221bab7434f5 -r a5ec3c1e6c37 modules/edocument_unece/tryton.cfg
--- a/modules/edocument_unece/tryton.cfg Fri Feb 13 14:22:58 2026 +0100
+++ b/modules/edocument_unece/tryton.cfg Fri Feb 13 18:27:14 2026 +0100
@@ -6,6 +6,8 @@
ir
party
product
+extras_depend:
+ account_invoice
xml:
product.xml
account.xml
@@ -18,3 +20,7 @@
product.Product
account.TaxTemplate
account.Tax
+
+[register account_invoice]
+model:
+ account.InvoicePaymentMean