diff options
| author | Damien Bouvy <dbo@odoo.com> | 2016-10-05 22:20:37 +0200 |
|---|---|---|
| committer | Damien Bouvy <dbo@odoo.com> | 2016-10-05 22:31:11 +0200 |
| commit | 4b831fb4b91694d8cecbd2ec1be14ad6108d54d7 (patch) | |
| tree | 71285a50875a8ab68bf9d689599de7d07d779a3a /addons/website_quote/controllers/main.py | |
| parent | 780869879b00d5772985e7c11003ac8a94451a61 (diff) | |
[FIX] website_quote: browse acquirer with sudo in all cases
Somehow in the migration to the new api, it was decided that the
acquirers would be browser as sudo only for token access. This caused
portal users to have a crash when trying to view their quotation since
some fields from acquirers are set the specific groups for security.
This commit reintroduces the old behaviour, which was to browse as
SUPERUSER in all cases for the rendering of the buttons.
Diffstat (limited to 'addons/website_quote/controllers/main.py')
| -rw-r--r-- | addons/website_quote/controllers/main.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index 10518e58ea3..0fcb9485d76 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -59,10 +59,7 @@ class sale_quote(http.Controller): } if Order.require_payment or values['need_payment']: - if token: - values['acquirers'] = list(request.env['payment.acquirer'].sudo().search([('website_published', '=', True), ('company_id', '=', Order.company_id.id)])) - else: - values['acquirers'] = list(request.env['payment.acquirer'].sudo(user=request.uid).search([('website_published', '=', True), ('company_id', '=', Order.company_id.id)])) + values['acquirers'] = list(request.env['payment.acquirer'].sudo().search([('website_published', '=', True), ('company_id', '=', Order.company_id.id)])) extra_context = { 'submit_class': 'btn btn-primary', 'submit_txt': _('Pay & Confirm') |
