2021-06-30 06:38:22 +00:00
|
|
|
# copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
|
2021-07-21 11:01:38 +00:00
|
|
|
from flectra import models, fields, api
|
2021-06-30 06:38:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AccountPaymentMethod(models.Model):
|
2021-07-21 11:01:38 +00:00
|
|
|
_inherit = 'account.payment.method'
|
2021-06-30 06:38:22 +00:00
|
|
|
|
2021-07-21 11:01:38 +00:00
|
|
|
pain_version = fields.Selection(selection_add=[
|
|
|
|
('pain.001.001.03.ch.02',
|
|
|
|
'pain.001.001.03.ch.02 (credit transfer in Switzerland)'),
|
|
|
|
])
|
2021-06-30 06:38:22 +00:00
|
|
|
|
|
|
|
def get_xsd_file_path(self):
|
|
|
|
self.ensure_one()
|
|
|
|
painv = self.pain_version
|
2021-07-21 11:01:38 +00:00
|
|
|
if painv == 'pain.001.001.03.ch.02':
|
|
|
|
path = 'l10n_ch_pain_credit_transfer/data/%s.xsd' % painv
|
2021-06-30 06:38:22 +00:00
|
|
|
return path
|
|
|
|
return super().get_xsd_file_path()
|