[FIX] mail_thread: fixed a bug when sending a notification coming from an action: the message user_id was reset, therefore not displaying the user name and avatar next to the message.

bzr revid: tde@openerp.com-20120312114639-fb5sggvvw1egnnzn
This commit is contained in:
Thibault Delavallée
2012-03-12 12:46:39 +01:00
parent 4f220ff718
commit 5326078437
-4
View File
@@ -101,10 +101,6 @@ class mail_thread(osv.osv):
subscription_obj = self.pool.get('mail.subscription')
notification_obj = self.pool.get('mail.notification')
# notifications do not come from any user, but from system
if vals.get('type') == 'notification': vals['user_id'] = False
if not 'model' in vals: vals['model'] = False
if not 'res_id' in vals: vals['res_id'] = 0
need_action_pushed = False
# create message