From 06cd3e55104427ca0531ba9e446f101b180e1755 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 27 Mar 2019 14:02:55 +0000 Subject: [PATCH] [FIX] account: invoices and bills filtering - Create a new Sale journal - From the accounting dashboard, click on the name of the journal created Invoices from all sale journals are shown. The filtering performed is not sufficient: it should filter by journal. opw-1958446 closes odoo/odoo#32166 Signed-off-by: Nicolas Martinelli (nim) --- addons/account/models/account_journal_dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index a59966157d3..3ade0b476b6 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -343,10 +343,10 @@ class account_journal(models.Model): action_name = 'action_view_bank_statement_tree' elif self.type == 'sale': action_name = 'action_invoice_tree1' - self = self.with_context(use_domain=[('type', 'in', ['out_invoice', 'out_refund'])]) + self = self.with_context(use_domain=[('journal_id', '=', self.id)]) elif self.type == 'purchase': action_name = 'action_vendor_bill_template' - self = self.with_context(use_domain=[('type', 'in', ['in_invoice', 'in_refund'])]) + self = self.with_context(use_domain=[('journal_id', '=', self.id)]) else: action_name = 'action_move_journal_line'