diff options
| author | Yannick Tivisse <yti@odoo.com> | 2019-11-04 16:40:11 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-11-05 16:18:10 +0100 |
| commit | 89cbc25a342f951caa3fcfd4e4b39c75e70273f7 (patch) | |
| tree | 7781af56374917f87afd69b9326f49026237e929 /addons/purchase/controllers | |
| parent | d58ab7fbae3414702593273e7acd6e9c7f4f44dc (diff) | |
[FIX] purchase: Allow internal users to see their own orders
Diffstat (limited to 'addons/purchase/controllers')
| -rw-r--r-- | addons/purchase/controllers/portal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/purchase/controllers/portal.py b/addons/purchase/controllers/portal.py index 171373bbec5..73e2b2bbb3a 100644 --- a/addons/purchase/controllers/portal.py +++ b/addons/purchase/controllers/portal.py @@ -18,7 +18,7 @@ class CustomerPortal(CustomerPortal): def _prepare_portal_layout_values(self): values = super(CustomerPortal, self)._prepare_portal_layout_values() - values['purchase_count'] = request.env['purchase.order'].search_count([ + values['purchase_count'] = request.env['purchase.order'].sudo().search_count([ ('state', 'in', ['purchase', 'done', 'cancel']) ]) return values |
