From a96e9fa1840f54139c252abb17dd336a9133da67 Mon Sep 17 00:00:00 2001 From: Saurabh Mishra Date: Tue, 22 Aug 2023 23:20:16 +0530 Subject: [PATCH] [FIX] l10n_ch: display qr bank options in ch localization When a user having CH Company tries to Add a Bank Accout then they will face the issue. Steps to produce: - Install `l10n_ch`. - Change company to CH Company. - Invoicing > Configuration > Banks > Add a Bank Account. Applying this commit will solve the issuse by allowing the user having CH Company to add a bank accout. The user was facing the issue because of the code: https://github.com/odoo/odoo/blob/2476a3ae2e3ed66875a2ea855be640d127b58cf2/addons/l10n_ch/wizard/setup_wizards.py#L21 In above code `self` is passed in as an arguement in the compute function while calling the function which is invalid. Error: `TypeError: ResPartnerBank._compute_l10n_ch_display_qr_bank_options() takes 1 positional argument but 2 were given` sentry-4389863088 closes odoo/odoo#135169 X-original-commit: aa22fd8c51b635dd084520e108eb7452a91ca032 Signed-off-by: Achraf Ben Azzouz (abz) Signed-off-by: Saurabh Mishra (sami) --- addons/l10n_ch/wizard/setup_wizards.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/l10n_ch/wizard/setup_wizards.py b/addons/l10n_ch/wizard/setup_wizards.py index 658f15bd600..efc2b6ac19a 100644 --- a/addons/l10n_ch/wizard/setup_wizards.py +++ b/addons/l10n_ch/wizard/setup_wizards.py @@ -18,4 +18,5 @@ class SwissSetupBarBankConfigWizard(models.TransientModel): @api.depends('partner_id', 'company_id') def _compute_l10n_ch_display_qr_bank_options(self): - self.res_partner_bank_id._compute_l10n_ch_display_qr_bank_options(self) + for wizard in self: + wizard.l10n_ch_display_qr_bank_options = wizard.res_partner_bank_id.l10n_ch_display_qr_bank_options