From d9ab32fef8d931cde89b872dd54396b02a235cff Mon Sep 17 00:00:00 2001 From: wan Date: Wed, 6 Jan 2021 09:38:48 +0000 Subject: [PATCH] [FIX] account: dashboard view cash statements Fine tuning of 78286851034b8f3ef4dcab78e50b7220c0bdd213 The link to view Cash Statements on the dashboard openned the wrong action. Also in some cases, removing the context key `search_default_journal` was not enough so we set it to `False` instead. closes #64118 closes odoo/odoo#64279 X-original-commit: 95ffa9fd122eae82d12d40db3cb7364cf3d3c919 Signed-off-by: oco-odoo Signed-off-by: wan --- addons/account/models/account_journal_dashboard.py | 2 +- addons/account/views/account_bank_statement_views.xml | 2 +- addons/account/views/account_journal_dashboard_view.xml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index eea762488a5..e7327acb924 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -518,7 +518,7 @@ class account_journal(models.Model): ctx = dict(self.env.context, default_journal_id=self.id) if ctx.get('search_default_journal', False): ctx.update(search_default_journal_id=self.id) - del ctx['search_default_journal'] # otherwise it will do a useless groupby in bank statements + ctx['search_default_journal'] = False # otherwise it will do a useless groupby in bank statements ctx.pop('group_by', None) action = self.env['ir.actions.act_window']._for_xml_id(f"account.{action_name}") action['context'] = ctx diff --git a/addons/account/views/account_bank_statement_views.xml b/addons/account/views/account_bank_statement_views.xml index d0d866657fc..00576e0d230 100644 --- a/addons/account/views/account_bank_statement_views.xml +++ b/addons/account/views/account_bank_statement_views.xml @@ -105,7 +105,7 @@ - + diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index f5aa106f76d..347a36c265e 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -60,7 +60,8 @@ View