[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 9434f7b64e
Closes PR #27583
Link to Task ID 30985
This commit is contained in:
David Beguin
2018-10-09 15:15:52 +00:00
parent 1ef791d1de
commit 01f642c17c
+1 -3
View File
@@ -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