mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_banking_pain_base: support party identifier for Spain
This commit is contained in:
committed by
Pedro M. Baeza
parent
e8fe4fd2d0
commit
39805fb08b
@@ -40,11 +40,16 @@
|
||||
Base module for PAIN file generation
|
||||
====================================
|
||||
|
||||
This module contains fields and functions that are used by the module for SEPA Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit (account_banking_sepa_direct_debit). This module doesn't provide any functionnality by itself.
|
||||
This module contains fields and functions that are used by the module for SEPA
|
||||
Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit
|
||||
(account_banking_sepa_direct_debit). This module doesn't provide any
|
||||
functionnality by itself.
|
||||
|
||||
This module is part of the banking addons: https://launchpad.net/banking-addons
|
||||
This module is part of the banking addons:
|
||||
https://www.github.com/OCA/banking-addons
|
||||
|
||||
This module was started during the Akretion-Noviat code sprint of November 21st 2013 in Epiais les Louvres (France).
|
||||
This module was started during the Akretion-Noviat code sprint of
|
||||
November 21st 2013 in Epiais les Louvres (France).
|
||||
''',
|
||||
'active': False,
|
||||
'installable': True,
|
||||
|
||||
@@ -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