From be2f050993b4caa0a7a52cbb2d4031836de25e7d Mon Sep 17 00:00:00 2001 From: wan Date: Mon, 2 Nov 2020 09:52:58 +0000 Subject: [PATCH] [FIX] account: view statement correct action The dashboard "View Statement" action on bank journals was using the `open_action` helper, but it was badly computed for journals with `bank_statements_source` set to `online_sync`. We were directed to the statement lines instead of the statements; and there was no other way to go to the list of statements. closes odoo/odoo#61190 X-original-commit: 78286851034b8f3ef4dcab78e50b7220c0bdd213 Signed-off-by: oco-odoo Signed-off-by: wan --- addons/account/models/account_journal_dashboard.py | 1 + addons/account/views/account_journal_dashboard_view.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 1f6bbe42c66..efddf269bdb 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -518,6 +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.pop('group_by', None) ir_model_obj = self.env['ir.model.data'] model, action_id = ir_model_obj.get_object_reference('account', action_name) diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 0bc040c2f5d..b37df81d2e2 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -60,7 +60,7 @@ View
- Statements + Statements
Operations