From 4611619c08c3502fdb113b0f5027f5a453d40980 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 14 Feb 2019 17:56:55 +0100 Subject: [PATCH] account_financial_report_qweb: usability improvement on onchange_partner_ids on general ledger wizard --- .../wizard/general_ledger_wizard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/account_financial_report_qweb/wizard/general_ledger_wizard.py b/account_financial_report_qweb/wizard/general_ledger_wizard.py index 78ea585f..b8a5476e 100644 --- a/account_financial_report_qweb/wizard/general_ledger_wizard.py +++ b/account_financial_report_qweb/wizard/general_ledger_wizard.py @@ -215,10 +215,11 @@ class GeneralLedgerReportWizard(models.TransientModel): @api.onchange('partner_ids') def onchange_partner_ids(self): """Handle partners change.""" - if self.partner_ids: + if ( + self.partner_ids and + not self.receivable_accounts_only and + not self.payable_accounts_only): self.receivable_accounts_only = self.payable_accounts_only = True - else: - self.receivable_accounts_only = self.payable_accounts_only = False @api.multi def button_export_html(self):