Add UNCL4461 code to invoice payment mean
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user