Add UNCL4461 code to invoice payment mean

This commit is contained in:
Cédric Krier
2026-02-13 18:27:14 +01:00
parent 8cb0fb2bbd
commit c5113b19dc
3 changed files with 29 additions and 0 deletions
+1
View File
@@ -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
+22
View File
@@ -132,3 +132,25 @@ class TaxTemplate(metaclass=PoolMeta):
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'
+6
View File
@@ -6,6 +6,8 @@ depends:
ir
party
product
extras_depend:
account_invoice
xml:
product.xml
account.xml
@@ -18,3 +20,7 @@ model:
product.Product
account.TaxTemplate
account.Tax
[register account_invoice]
model:
account.InvoicePaymentMean