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
|
2021-06-30 06:38:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AccountPaymentLine(models.Model):
|
2021-07-21 11:01:38 +00:00
|
|
|
_inherit = 'account.payment.line'
|
2021-06-30 06:38:22 +00:00
|
|
|
|
2021-07-21 11:01:38 +00:00
|
|
|
local_instrument = fields.Selection(
|
|
|
|
selection_add=[('CH01', 'CH01 (ISR)')])
|
|
|
|
communication_type = fields.Selection(selection_add=[
|
|
|
|
('isr', 'ISR'),
|
|
|
|
('QRR', 'QR-Bill with QR-IBAN and Reference Number'),
|
|
|
|
('SCOR', 'QR-Bill with IBAN and Reference Text'),
|
|
|
|
],ondelete={'isr': 'cascade','QRR':'cascade','SCOR':'cascade'})
|
2021-06-30 06:38:22 +00:00
|
|
|
|
|
|
|
def invoice_reference_type2communication_type(self):
|
2021-07-21 11:01:38 +00:00
|
|
|
res = super(AccountPaymentLine, self).\
|
|
|
|
invoice_reference_type2communication_type()
|
|
|
|
res['isr'] = 'isr'
|
|
|
|
res['QRR'] = 'QRR'
|
|
|
|
res['SCOR'] = 'SCOR'
|
2021-06-30 06:38:22 +00:00
|
|
|
return res
|