[IMP] mail: message_new in mailgateway is done with nolog context: no 'document created' message.

bzr revid: tde@openerp.com-20130214162011-0xhjo7l5y8733usr
This commit is contained in:
Thibault Delavallée 2013-02-14 17:20:11 +01:00
parent 336f7cb9a5
commit 3a8426e5c5
1 changed files with 1 additions and 0 deletions

View File

@ -605,6 +605,7 @@ class mail_thread(osv.AbstractModel):
if thread_id and hasattr(model_pool, 'message_update'):
model_pool.message_update(cr, user_id, [thread_id], msg, context=nosub_ctx)
else:
nosub_ctx = dict(nosub_ctx, mail_create_nolog=True)
thread_id = model_pool.message_new(cr, user_id, msg, custom_values, context=nosub_ctx)
else:
assert thread_id == 0, "Posting a message without model should be with a null res_id, to create a private message."