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:
commit
286ced7183
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue