From f4f8e6c8f3bb2e1cc8b1af53b67fdd4e34420b5b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 31 Dec 2014 13:43:02 +0100 Subject: [PATCH] [FIX] account_banking_pain_base: Set a general rule for the initiating party identifier --- account_banking_pain_base/models/res_company.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/account_banking_pain_base/models/res_company.py b/account_banking_pain_base/models/res_company.py index 182327f8a..2e5509de4 100644 --- a/account_banking_pain_base/models/res_company.py +++ b/account_banking_pain_base/models/res_company.py @@ -44,13 +44,11 @@ class ResCompany(orm.Model): assert isinstance(company_id, int), 'Only one company ID' company = self.browse(cr, uid, company_id, context=context) company_vat = company.vat - party_identifier = False - if company_vat: + party_identifier = company.sepa_creditor_identifier + if not party_identifier and company_vat: country_code = company_vat[0:2].upper() if country_code == 'BE': party_identifier = company_vat[2:].replace(' ', '') - elif country_code == 'ES': - party_identifier = company.sepa_creditor_identifier return party_identifier def _initiating_party_issuer_default(self, cr, uid, context=None):