From 01f642c17cea504bbdbabe45303021ed77861a6c Mon Sep 17 00:00:00 2001 From: David Beguin Date: Tue, 9 Oct 2018 13:37:08 +0000 Subject: [PATCH] [FIX] account, portal : align invoices counter and view domains The idea of removing the domain was to have the portal views based only on access rights and rules. We were just not really consistent in not removing the domain on the counter. If the user has the right to see also supplier invoices, it makes sens to let the user see them in the portal. The domain on the counter is then here removed to align both counter and views. Fix commit 9434f7b64ec5ecb5e0a4036c60998bf599fa2ba4 Closes PR #27583 Link to Task ID 30985 --- addons/account/controllers/portal.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/controllers/portal.py b/addons/account/controllers/portal.py index e66e6a68d35..cc042385bc1 100644 --- a/addons/account/controllers/portal.py +++ b/addons/account/controllers/portal.py @@ -12,9 +12,7 @@ class PortalAccount(CustomerPortal): def _prepare_portal_layout_values(self): values = super(PortalAccount, self)._prepare_portal_layout_values() - invoice_count = request.env['account.invoice'].search_count([ - ('type', 'in', ['out_invoice', 'out_refund']) - ]) + invoice_count = request.env['account.invoice'].search_count([]) values['invoice_count'] = invoice_count return values