diff --git a/account_banking_pain_base/models/account_payment_line.py b/account_banking_pain_base/models/account_payment_line.py index 9ecf53d86..f599860e9 100644 --- a/account_banking_pain_base/models/account_payment_line.py +++ b/account_banking_pain_base/models/account_payment_line.py @@ -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 diff --git a/account_banking_pain_base/models/bank_payment_line.py b/account_banking_pain_base/models/bank_payment_line.py index 7885d701a..bf802ce6e 100644 --- a/account_banking_pain_base/models/bank_payment_line.py +++ b/account_banking_pain_base/models/bank_payment_line.py @@ -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 diff --git a/account_banking_pain_base/views/account_payment_line.xml b/account_banking_pain_base/views/account_payment_line.xml index 6adab6916..640175857 100644 --- a/account_banking_pain_base/views/account_payment_line.xml +++ b/account_banking_pain_base/views/account_payment_line.xml @@ -14,6 +14,7 @@ + diff --git a/account_banking_pain_base/views/bank_payment_line_view.xml b/account_banking_pain_base/views/bank_payment_line_view.xml index 17d4e3049..672e4bbbe 100644 --- a/account_banking_pain_base/views/bank_payment_line_view.xml +++ b/account_banking_pain_base/views/bank_payment_line_view.xml @@ -14,6 +14,7 @@ +