summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-10-29 11:12:30 +0100
committerThibault Delavallée <tde@openerp.com>2012-10-29 11:12:30 +0100
commita2d3d1df80c044ed62a02e47d7dca242b385992d (patch)
tree38ada1b95c6379b8d7960d6d4302c5e87affe26a /addons
parentcbf55bc07d979dac915a3d7314ee0979ec4d17ff (diff)
[CLEAN] message_post_api: removed unnecessary type arg (posting is a comment).
bzr revid: tde@openerp.com-20121029101230-x39pep9p5edd54ml
Diffstat (limited to 'addons')
-rw-r--r--addons/mail/mail_thread.py5
-rw-r--r--addons/mail/res_users.py5
-rw-r--r--addons/mail/static/src/js/mail.js1
3 files changed, 4 insertions, 7 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index c5ec4c2b17a..e986f12b822 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -707,13 +707,12 @@ class mail_thread(osv.AbstractModel):
return mail_message.create(cr, uid, values, context=context)
- def message_post_api(self, cr, uid, thread_id, body='', subject=False, type='notification',
- parent_id=False, attachment_ids=None, context=None):
+ def message_post_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False, attachment_ids=None, context=None):
""" Wrapper on message_post, used only in Chatter (JS). The purpose is
to handle attachments.
# TDE FIXME: body is plaintext: convert it into html
"""
- new_message_id = self.message_post(cr, uid, thread_id=thread_id, body=body, subject=subject, type=type,
+ new_message_id = self.message_post(cr, uid, thread_id=thread_id, body=body, subject=subject, type='comment',
subtype='mail.mt_comment', parent_id=parent_id, context=context)
# HACK FIXME: Chatter: attachments linked to the document (not done JS-side), load the message
diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py
index 4ef2dda6d9c..1b6388111ba 100644
--- a/addons/mail/res_users.py
+++ b/addons/mail/res_users.py
@@ -111,8 +111,7 @@ class res_users(osv.Model):
alias_pool.unlink(cr, uid, alias_ids, context=context)
return res
- def message_post_api(self, cr, uid, thread_id, body='', subject=False, type='notification',
- parent_id=False, attachment_ids=None, context=None, **kwargs):
+ def message_post_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False, attachment_ids=None, context=None):
""" Redirect the posting of message on res.users to the related partner.
This is done because when giving the context of Chatter on the
various mailboxes, we do not have access to the current partner_id.
@@ -124,7 +123,7 @@ class res_users(osv.Model):
thread_id = thread_id[0]
partner_id = self.pool.get('res.users').read(cr, uid, thread_id, ['partner_id'], context=context)['partner_id'][0]
return self.pool.get('res.partner').message_post_api(cr, uid, partner_id, body=body, subject=subject,
- type=type, parent_id=parent_id, attachment_ids=attachment_ids, context=context, **kwargs)
+ parent_id=parent_id, attachment_ids=attachment_ids, context=context)
def message_post(self, cr, uid, thread_id, context=None, **kwargs):
""" Redirect the posting of message on res.users to the related partner.
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 6a409782117..0b6a8ec86d2 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -358,7 +358,6 @@ openerp.mail = function (session) {
this.context.default_res_id,
mail.ChatterUtils.get_text2html(body),
false,
- 'comment',
this.context.default_parent_id,
attachments,
this.parent_thread.context