mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Add the party identifier support for Spain.
This commit is contained in:
@@ -45,8 +45,12 @@ class res_company(orm.Model):
|
||||
company = self.browse(cr, uid, company_id, context=context)
|
||||
company_vat = company.vat
|
||||
party_identifier = False
|
||||
if company_vat and company_vat[0:2].upper() in ['BE']:
|
||||
party_identifier = company_vat[2:].replace(' ', '')
|
||||
if 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):
|
||||
|
||||
Reference in New Issue
Block a user