[FIX] website_mail: do not propagate csrf_token to message_post method

Indeed through portal users can post a message. Form used in order to
do so include a csrf token. However this one should not be propagated
to message_post because it is not a mail_message model field.
This creates unnecessary warnings.

Closes #13956 .
This commit is contained in:
Antonio Espinosa
2017-05-29 13:57:10 +02:00
committed by Thibault Delavallée
parent b21426ab9c
commit a0ff74b78d
+1
View File
@@ -65,6 +65,7 @@ def _message_post_helper(res_model='', res_id=None, message='', token='', token_
res = res.sudo()
else:
raise NotFound()
kw.pop('csrf_token', None)
return res.with_context({'mail_create_nosubscribe': nosubscribe}).message_post(body=message,
message_type=kw.pop('message_type', False) or "comment",
subtype=kw.pop('subtype', False) or "mt_comment",