l10n-switzerland-flectra/l10n_ch_pain_base/models/account_payment_line.py
Raphael Ritter bc2374f0d9 moved to f2
2021-06-30 08:39:40 +02:00

20 lines
672 B
Python

# copyright 2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from flectra import fields, models
class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"
local_instrument = fields.Selection(selection_add=[("CH01", "CH01 (ISR)")])
communication_type = fields.Selection(
selection_add=[("isr", "ISR"), ("qrr", "QRR")],
ondelete={"isr": "cascade", "qrr": "cascade"},
)
def invoice_reference_type2communication_type(self):
res = super().invoice_reference_type2communication_type()
res["isr"] = "isr"
return res