[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 09:56:40 +02:00
parent 489742873d
commit afc495a99e
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'],