Skip to content

Commit

Permalink
[MIG] l10n_ch_pain_base: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon authored and ecino committed Jun 5, 2023
1 parent a9d5b26 commit 1803872
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
2 changes: 1 addition & 1 deletion l10n_ch_pain_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
10 changes: 2 additions & 8 deletions l10n_ch_pain_base/models/account_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion l10n_ch_pain_base/models/account_payment_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 0 additions & 22 deletions l10n_ch_pain_base/views/bank_payment_line.xml

This file was deleted.

0 comments on commit 1803872

Please sign in to comment.