Skip to content
Snippets Groups Projects
Commit 326dc3f7 authored by Djamel (otd)'s avatar Djamel (otd)
Browse files

[FIX] l10n_ch: fix the qr_iban fields to only appear for Swiss companies


Steps to reproduce the bug :
- Create a French company
- Go to accounting settings > in “Fiscal Localization” install French accounting
- Install “l10n_ch_qriban”
- Go to contacts > Configuration > Bank accounts
- Create a new bank account > add a French company newly created in the “Account Holder” field

Problem:
The specific fields to a Swiss company appear.

Solution :
Check if the country of the company encoded in the “Account Holder” field is Switzerland.

opw-2504699

closes odoo/odoo#69813

Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
parent 8a4f4bf0
Branches
Tags
No related merge requests found
......@@ -85,7 +85,7 @@ class ResPartnerBank(models.Model):
def _compute_l10n_ch_show_subscription(self):
for bank in self:
if bank.partner_id:
bank.l10n_ch_show_subscription = bool(bank.partner_id.ref_company_ids)
bank.l10n_ch_show_subscription = bank.partner_id.ref_company_ids.country_id.code =='CH'
elif bank.company_id:
bank.l10n_ch_show_subscription = bank.company_id.country_id.code == 'CH'
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment