mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Add field local_instrument in payment lines and bank payment lines
This commit is contained in:
committed by
Enric Tobella
parent
63946e09f3
commit
872a34b8d5
@@ -15,6 +15,10 @@ class AccountPaymentLine(models.Model):
|
||||
string='Priority', default='NORM',
|
||||
help="This field will be used as 'Instruction Priority' in "
|
||||
"the generated PAIN file.")
|
||||
# local_instrument is used in some countries, for example
|
||||
# switzerland, cf l10n_ch_sepa that adds some entries in
|
||||
# the selection field
|
||||
local_instrument = fields.Selection([], string='Local Instrument')
|
||||
# PAIN allows 140 characters
|
||||
communication = fields.Char(size=140)
|
||||
# The field struct_communication_type has been dropped in v9
|
||||
|
||||
@@ -10,10 +10,13 @@ class BankPaymentLine(models.Model):
|
||||
|
||||
priority = fields.Selection(
|
||||
related='payment_line_ids.priority', string='Priority')
|
||||
local_instrument = fields.Selection(
|
||||
related='payment_line_ids.local_instrument',
|
||||
string='Local Instrument')
|
||||
|
||||
@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']
|
||||
res += ['priority', 'local_instrument']
|
||||
return res
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="communication_type" position="before">
|
||||
<field name="priority"/>
|
||||
<field name="local_instrument" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_bank_id" position="after">
|
||||
<field name="priority"/>
|
||||
<field name="local_instrument" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user