From 6bea3b189b549b6f9dd24ab57a9889d7a8ea4e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 4 Sep 2012 18:14:53 +0200 Subject: [PATCH] [FIX] share: fixed call to schedule_with_attach, as send_invite_email is now commented. This module will be cleaned in the next few days, and all invite mechanism is likely to disappear. scedule_with_attach is therefore commented and not really fixed. bzr revid: tde@openerp.com-20120904161453-vq8zartows3eggtp --- addons/share/wizard/share_wizard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index a0489c9c017..c6b628c395f 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -775,8 +775,8 @@ class share_wizard(osv.TransientModel): if res_id <= 0: raise osv.except_osv(_('Record id not found'), _('The share engine has not been able to fetch a record_id for your invitation.')) self.pool.get(model.model).message_subscribe(cr, uid, [res_id], new_ids + existing_ids, context=context) - self.send_invite_email(cr, uid, wizard_data, context=context) - self.send_invite_note(cr, uid, model.model, res_id, wizard_data, context=context) + # self.send_invite_email(cr, uid, wizard_data, context=context) + # self.send_invite_note(cr, uid, model.model, res_id, wizard_data, context=context) # CLOSE # A. Not invite: as before @@ -820,9 +820,10 @@ class share_wizard(osv.TransientModel): elif tmp_idx == len(wizard_data.result_line_ids)-2: body += ' and' body += '.' - return self.pool.get(model_name).message_post(cr, uid, [res_id], _('System Notification'), body, context=context) + return self.pool.get(model_name).message_post(cr, uid, [res_id], body=body, context=context) def send_invite_email(self, cr, uid, wizard_data, context=None): + # TDE Note: not updated because will disappear message_obj = self.pool.get('mail.message') notification_obj = self.pool.get('mail.notification') user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)