From 4929cba44b2e856f2811ece8f0c9b01981024598 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 11 Mar 2015 11:57:54 +0100 Subject: [PATCH] Limit lenght of mandate reference, according to ISO 20022 --- .../models/account_banking_mandate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account_banking_sepa_direct_debit/models/account_banking_mandate.py b/account_banking_sepa_direct_debit/models/account_banking_mandate.py index 170866798..56b4c870d 100644 --- a/account_banking_sepa_direct_debit/models/account_banking_mandate.py +++ b/account_banking_sepa_direct_debit/models/account_banking_mandate.py @@ -70,12 +70,14 @@ class AccountBankingMandate(models.Model): "active.", default=True) original_mandate_identification = fields.Char( string='Original Mandate Identification', track_visibility='onchange', + size=35, help="When the field 'Migrated to SEPA' is not active, this field " "will be used as the Original Mandate Identification in the " "Direct Debit file.") scheme = fields.Selection([('CORE', 'Basic (CORE)'), ('B2B', 'Enterprise (B2B)')], string='Scheme', required=True, default="CORE") + unique_mandate_reference = fields.Char(size=35) # cf ISO 20022 @api.one @api.constrains('type', 'recurrent_sequence_type')