diff --git a/l10n_ch_pain_base/__manifest__.py b/l10n_ch_pain_base/__manifest__.py index e19107792..7614c05ea 100644 --- a/l10n_ch_pain_base/__manifest__.py +++ b/l10n_ch_pain_base/__manifest__.py @@ -11,6 +11,6 @@ "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "license": "AGPL-3", "depends": ["account_banking_pain_base", "l10n_ch_base_bank"], - "data": ["views/account_payment_line.xml", "views/bank_payment_line.xml"], + "data": ["views/account_payment_line.xml"], "installable": True, } diff --git a/l10n_ch_pain_base/models/account_payment_line.py b/l10n_ch_pain_base/models/account_payment_line.py index 35b419d54..a1d65ca41 100644 --- a/l10n_ch_pain_base/models/account_payment_line.py +++ b/l10n_ch_pain_base/models/account_payment_line.py @@ -8,17 +8,11 @@ class AccountPaymentLine(models.Model): _inherit = "account.payment.line" local_instrument = fields.Selection( - selection_add=[("CH01", "CH01 (ISR)")], - ondelete={ - "CH01": "set null" - } + selection_add=[("CH01", "CH01 (ISR)")], ondelete={"CH01": "set null"} ) communication_type = fields.Selection( selection_add=[("isr", "ISR"), ("qrr", "QRR")], - ondelete={ - "isr": "set null", - "qrr": "set null" - } + ondelete={"isr": "set default", "qrr": "set default"}, ) def invoice_reference_type2communication_type(self): diff --git a/l10n_ch_pain_base/models/account_payment_order.py b/l10n_ch_pain_base/models/account_payment_order.py index 1509ecde1..2a9d45981 100644 --- a/l10n_ch_pain_base/models/account_payment_order.py +++ b/l10n_ch_pain_base/models/account_payment_order.py @@ -35,7 +35,8 @@ def generate_pain_attrib(self): pain_flavor = self.payment_mode_id.payment_method_id.pain_version if pain_flavor in ["pain.001.001.03.ch.02", "pain.008.001.02.ch.01"]: attrib = { - "{http://www.w3.org/2001/XMLSchema-instance}schemaLocation": "http://www.six-interbank-clearing.com/de/" + "{http://www.w3.org/2001/XMLSchema-instance}" + "schemaLocation": "http://www.six-interbank-clearing.com/de/" "%s.xsd %s.xsd" % (pain_flavor, pain_flavor) } return attrib diff --git a/l10n_ch_pain_base/views/bank_payment_line.xml b/l10n_ch_pain_base/views/bank_payment_line.xml deleted file mode 100644 index a67b89c1f..000000000 --- a/l10n_ch_pain_base/views/bank_payment_line.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - l10n_ch_sepa.bank.payment.line.form - bank.payment.line - - - - 0 - - - - -