From 6183fb105efd310d5922b168b0d6a4a59d2ff3f4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 9 Jul 2014 10:45:35 +0200 Subject: [PATCH] [FIX] website_crm: the path '/crm/contactus' have an error if you does'nt use the website contact form or if you reload the page, insead of redirect to contact form. --- addons/website_crm/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_crm/controllers/main.py b/addons/website_crm/controllers/main.py index 37d661e8a04..935e1005c6b 100644 --- a/addons/website_crm/controllers/main.py +++ b/addons/website_crm/controllers/main.py @@ -40,7 +40,7 @@ class contactus(http.Controller): post_file = [] # List of file to add to ir_attachment once we have the ID post_description = [] # Info to add after the message - values = {'user_id': False} + values = {} lead_model = request.registry['crm.lead'] @@ -81,7 +81,7 @@ class contactus(http.Controller): post_description.append("%s: %s" % ("REFERER", environ.get("HTTP_REFERER"))) values['description'] += dict_to_str(_("Environ Fields: "), post_description) - lead_id = lead_model.create(request.cr, SUPERUSER_ID, values, request.context) + lead_id = lead_model.create(request.cr, SUPERUSER_ID, dict(values, user_id=False), request.context) if lead_id: for field_value in post_file: attachment_value = {