Merge pull request #405 from odoo-dev/saas-5-fix-website-contact-form-chm

[FIX] website_crm: when there is an error in required field, user_id=False in the controller overwrite the user_id browse record to display the contact form template.
This commit is contained in:
Christophe Matthieu 2014-06-06 12:40:44 +02:00
commit 286ced7183
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,6 @@ class contactus(http.Controller):
'contact_name': contact_name,
'email_from': email_from,
'name': name or contact_name,
'user_id': False,
}
# fields validation
@ -51,6 +50,7 @@ class contactus(http.Controller):
except ValueError:
pass
post['user_id'] = False
environ = request.httprequest.headers.environ
post['description'] = "%s\n-----------------------------\nIP: %s\nUSER_AGENT: %s\nACCEPT_LANGUAGE: %s\nREFERER: %s" % (
post['description'],