From 989ce9204b9d6ade19a609805b7b2ba22c5d5b8b Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Thu, 13 Sep 2012 12:47:24 +0530 Subject: [PATCH] [FIX] plugin: should call message_process instead of message_new for new message bzr revid: hmo@tinyerp.com-20120913071724-re6w0fy6jspldsjh --- addons/mail/mail_thread.py | 2 +- addons/plugin/plugin_handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index c0d6ac90fe6..651b064d7aa 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -378,7 +378,7 @@ class mail_thread(osv.AbstractModel): else: thread_id = model_pool.message_new(cr, user_id, msg, custom_values, context=context) self.message_post(cr, uid, [thread_id], context=context, **msg) - return True + return thread_id def message_new(self, cr, uid, msg_dict, custom_values=None, context=None): """Called by ``message_process`` when a new message is received diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 8f0fdc1ad8e..dee2cac117d 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -103,7 +103,7 @@ class plugin_handler(osv.osv_memory): if model == 'res.partner': notify = 'User the Partner button to create a new partner' else: - res_id = model_obj.message_new(cr, uid, msg) + res_id = model_obj.message_process(cr, uid, model, email) notify = "Mail successfully pushed, a new %s has been created " % model else: model_obj.message_post(cr, uid, [res_id],