mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[ADD] sepa: support for Purpose Code
This commit is contained in:
committed by
Carlos Roca
parent
4e838b5686
commit
b5043ed3fa
@@ -55,6 +55,111 @@ class AccountPaymentLine(models.Model):
|
||||
], string="Category Purpose",
|
||||
help="If neither your bank nor your local regulations oblige you to "
|
||||
"set the category purpose, leave the field empty.")
|
||||
purpose = fields.Selection(
|
||||
# Full category purpose list found on:
|
||||
# https://www.iso20022.org/external_code_list.page
|
||||
# Document "External Code Sets spreadsheet" version 31 August, 2018
|
||||
selection=[
|
||||
('ACCT', 'Account Management'),
|
||||
('CASH', 'Cash Management Transfer'),
|
||||
('COLL', 'Collection Payment'),
|
||||
('INTC', 'Intra Company Payment'),
|
||||
('LIMA', 'Liquidity Management'),
|
||||
('NETT', 'Netting'),
|
||||
('AGRT', 'Agricultural Transfer'),
|
||||
('BEXP', 'Business Expenses'),
|
||||
('COMC', 'Commercial Payment'),
|
||||
('CPYR', 'Copyright'),
|
||||
('GDDS', 'Purchase Sale Of Goods'),
|
||||
('LICF', 'License Fee'),
|
||||
('ROYA', 'Royalties'),
|
||||
('SCVE', 'Purchase Sale Of Services'),
|
||||
('SUBS', 'Subscription'),
|
||||
('SUPP', 'Supplier Payment'),
|
||||
('TRAD', 'Trade Services'),
|
||||
('CHAR', 'Charity Payment'),
|
||||
('COMT', 'Consumer Third Party Consolidated Payment'),
|
||||
('CLPR', 'Car Loan Principal Repayment'),
|
||||
('GOVI', 'Government Insurance'),
|
||||
('HLRP', 'Housing Loan Repayment'),
|
||||
('INSU', 'Insurance Premium'),
|
||||
('INTE', 'Interest'),
|
||||
('LBRI', 'Labor Insurance'),
|
||||
('LIFI', 'Life Insurance'),
|
||||
('LOAN', 'Loan'),
|
||||
('LOAR', 'Loan Repayment'),
|
||||
('PPTI', 'Property Insurance'),
|
||||
('RINP', 'Recurring Installment Payment'),
|
||||
('TRFD', 'Trust Fund'),
|
||||
('ADVA', 'Advance Payment'),
|
||||
('CCRD', 'Credit Card Payment '),
|
||||
('CFEE', 'Cancellation Fee'),
|
||||
('COST', 'Costs'),
|
||||
('DCRD', 'Debit Card Payment'),
|
||||
('GOVT', 'Government Payment'),
|
||||
('IHRP', 'Instalment Hire Purchase Agreement'),
|
||||
('INSM', 'Installment'),
|
||||
('MSVC', 'Multiple Service Types'),
|
||||
('NOWS', 'Not Otherwise Specified'),
|
||||
('OFEE', 'Opening Fee'),
|
||||
('OTHR', 'Other'),
|
||||
('PADD', 'Preauthorized debit'),
|
||||
('PTSP', 'Payment Terms'),
|
||||
('RCPT', 'Receipt Payment'),
|
||||
('RENT', 'Rent'),
|
||||
('STDY', 'Study'),
|
||||
('ANNI', 'Annuity'),
|
||||
('CMDT', 'Commodity Transfer'),
|
||||
('DERI', 'Derivatives'),
|
||||
('DIVD', 'Dividend'),
|
||||
('FREX', 'Foreign Exchange'),
|
||||
('HEDG', 'Hedging'),
|
||||
('PRME', 'Precious Metal'),
|
||||
('SAVG', 'Savings'),
|
||||
('SECU', 'Securities'),
|
||||
('TREA', 'Treasury Payment'),
|
||||
('ANTS', 'Anesthesia Services'),
|
||||
('CVCF', 'Convalescent Care Facility'),
|
||||
('DMEQ', 'Durable Medicale Equipment'),
|
||||
('DNTS', 'Dental Services'),
|
||||
('HLTC', 'Home Health Care'),
|
||||
('HLTI', 'Health Insurance'),
|
||||
('HSPC', 'Hospital Care'),
|
||||
('ICRF', 'Intermediate Care Facility'),
|
||||
('LTCF', 'Long Term Care Facility'),
|
||||
('MDCS', 'Medical Services'),
|
||||
('VIEW', 'Vision Care'),
|
||||
('ALMY', 'Alimony Payment'),
|
||||
('BECH', 'Child Benefit'),
|
||||
('BENE', 'Unemployment Disability Benefit'),
|
||||
('BONU', 'Bonus Payment.'),
|
||||
('COMM', 'Commission'),
|
||||
('PENS', 'Pension Payment'),
|
||||
('PRCP', 'Price Payment'),
|
||||
('SALA', 'Salary Payment'),
|
||||
('SSBE', 'Social Security Benefit'),
|
||||
('ESTX', 'Estate Tax'),
|
||||
('HSTX', 'Housing Tax'),
|
||||
('INTX', 'Income Tax'),
|
||||
('TAXS', 'Tax Payment'),
|
||||
('VATX', 'Value Added Tax Payment'),
|
||||
('AIRB', 'Air'),
|
||||
('BUSB', 'Bus'),
|
||||
('FERB', 'Ferry'),
|
||||
('RLWY', 'Railway'),
|
||||
('CBTV', 'Cable TV Bill'),
|
||||
('ELEC', 'Electricity Bill'),
|
||||
('ENRG', 'Energies'),
|
||||
('GASB', 'Gas Bill'),
|
||||
('NWCH', 'Network Charge'),
|
||||
('NWCM', 'Network Communication'),
|
||||
('OTLC', 'Other Telecom Related Bill'),
|
||||
('PHON', 'Telephone Bill'),
|
||||
('WTER', 'Water Bill'),
|
||||
],
|
||||
help="If neither your bank nor your local regulations oblige you to "
|
||||
"set the category purpose, leave the field empty.",
|
||||
)
|
||||
# PAIN allows 140 characters
|
||||
communication = fields.Char(size=140)
|
||||
# The field struct_communication_type has been dropped in v9
|
||||
|
||||
@@ -14,10 +14,12 @@ class BankPaymentLine(models.Model):
|
||||
string='Local Instrument')
|
||||
category_purpose = fields.Selection(
|
||||
related='payment_line_ids.category_purpose', string='Category Purpose')
|
||||
purpose = fields.Selection(
|
||||
related='payment_line_ids.purpose')
|
||||
|
||||
@api.model
|
||||
def same_fields_payment_line_and_bank_payment_line(self):
|
||||
res = super(BankPaymentLine, self).\
|
||||
same_fields_payment_line_and_bank_payment_line()
|
||||
res += ['priority', 'local_instrument', 'category_purpose']
|
||||
res += ['priority', 'local_instrument', 'category_purpose', 'purpose']
|
||||
return res
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<field name="priority"/>
|
||||
<field name="local_instrument"/>
|
||||
<field name="category_purpose"/>
|
||||
<field name="purpose"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<field name="priority"/>
|
||||
<field name="local_instrument"/>
|
||||
<field name="category_purpose"/>
|
||||
<field name="purpose"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user