summaryrefslogtreecommitdiff
path: root/addons/website_form/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_form/controllers/main.py')
-rw-r--r--addons/website_form/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_form/controllers/main.py b/addons/website_form/controllers/main.py
index 742a8eeb0b7..2f5f7ec2292 100644
--- a/addons/website_form/controllers/main.py
+++ b/addons/website_form/controllers/main.py
@@ -21,7 +21,7 @@ class WebsiteForm(http.Controller):
# Check and insert values from the form on the model <model>
@http.route('/website_form/<string:model_name>', type='http', auth="public", methods=['POST'], website=True)
def website_form(self, model_name, **kwargs):
- model_record = request.env['ir.model'].search([('model', '=', model_name), ('website_form_access', '=', True)])
+ model_record = request.env['ir.model'].sudo().search([('model', '=', model_name), ('website_form_access', '=', True)])
if not model_record:
return json.dumps(False)