summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2014-07-09 10:45:35 +0200
committerChristophe Matthieu <chm@odoo.com>2014-07-09 10:45:35 +0200
commit6183fb105efd310d5922b168b0d6a4a59d2ff3f4 (patch)
treeab28a2a4cbf9c156bd0ab1a1deeb4714259eca63
parente0ed658044f7b9c646b9e12dc96eb17b90e80c96 (diff)
[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.
-rw-r--r--addons/website_crm/controllers/main.py4
1 files 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 = {