diff options
| author | Yannick Tivisse <yti@odoo.com> | 2019-11-22 13:40:20 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-11-22 14:45:22 +0000 |
| commit | 26e32dac34cd2fdd59d3cebbfc2a8a4cb7f25fea (patch) | |
| tree | 41ec5d2f7c64900134afcc8900d1bb87f4dbf8f6 /addons/account | |
| parent | 368fde4704013fdbb7ac16dfa1e67a227dc813f5 (diff) | |
[IMP] portal: Partial revert of #37312
Purpose
=======
This fix makes no sense because it exposes some private data to
portal users. Fortunately it was only introduced in the master branch.
closes odoo/odoo#40710
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/account')
| -rw-r--r-- | addons/account/controllers/portal.py | 3 |
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 |
