summaryrefslogtreecommitdiff
path: root/addons/account/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account/controllers')
-rw-r--r--addons/account/controllers/portal.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/account/controllers/portal.py b/addons/account/controllers/portal.py
index 005f1997af4..b72d3415bcf 100644
--- a/addons/account/controllers/portal.py
+++ b/addons/account/controllers/portal.py
@@ -11,8 +11,7 @@ class PortalAccount(CustomerPortal):
def _prepare_portal_layout_values(self):
values = super(PortalAccount, self)._prepare_portal_layout_values()
- # An internal user could not have access to the account.move model
- invoice_count = request.env['account.move'].sudo().search_count([
+ invoice_count = request.env['account.move'].search_count([
('type', 'in', ('out_invoice', 'in_invoice', 'out_refund', 'in_refund', 'out_receipt', 'in_receipt')),
])
values['invoice_count'] = invoice_count