From 397f2e6c50640ed74bdd5174824768bcda0d9581 Mon Sep 17 00:00:00 2001 From: Toufik Ben Jaa Date: Mon, 25 Feb 2019 09:46:42 +0000 Subject: [PATCH] [FIX] account: Use the correct journal on accounting dashboard - When selecting "Unpaid invoices" or "Invoices to validate" on the accounting dashboard, the list view opened doesn't filter with the journal selected. closes odoo/odoo#31397 --- addons/account/models/account_journal_dashboard.py | 5 ++--- addons/account/views/account_invoice_view.xml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 975659cc377..eeaca15fae8 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -367,12 +367,11 @@ class account_journal(models.Model): 'journal_type': self.type, 'default_journal_id': self.id, 'default_type': invoice_type, - 'type': invoice_type + 'type': invoice_type, + 'search_default_journal_id': self.id, }) [action] = self.env.ref('account.%s' % action_name).read() - if not self.env.context.get('use_domain'): - ctx['search_default_journal_id'] = self.id action['context'] = ctx action['domain'] = self._context.get('use_domain', []) account_invoice_filter = self.env.ref('account.view_account_invoice_filter', False) diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index 5df72699ccd..cb6c3ea93da 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -643,6 +643,7 @@ +