[FIX] mail: message_post_api call and new_message_id value
bzr revid: chm@openerp.com-20121019073338-brb0g1qivvs9pyry
This commit is contained in:
@@ -708,7 +708,7 @@ class mail_thread(osv.AbstractModel):
|
||||
ir_attachment.write(cr, SUPERUSER_ID, attachment_ids, { 'res_model': self._name, 'res_id': thread_id }, context=context)
|
||||
mail_message.write(cr, SUPERUSER_ID, [new_message_id], {'attachment_ids': [(6, 0, [pid for pid in attachment_ids])]} )
|
||||
|
||||
new_message = self.pool.get('mail.message').message_read(cr, uid, [added_message_id])
|
||||
new_message = self.pool.get('mail.message').message_read(cr, uid, [new_message_id])
|
||||
return new_message
|
||||
|
||||
#------------------------------------------------------
|
||||
|
||||
@@ -336,7 +336,7 @@ openerp.mail = function(session) {
|
||||
mail.ChatterUtils.get_text2html(body),
|
||||
false,
|
||||
'comment',
|
||||
'mail.mt_comment',,
|
||||
'mail.mt_comment',
|
||||
this.context.default_parent_id,
|
||||
attachments,
|
||||
_.extend(this.parent_thread.context, {'message_loaded':[this.datasets.id||0].concat( self.parent_thread.options.thread._parents[0].get_child_ids() )})]
|
||||
|
||||
Reference in New Issue
Block a user