summaryrefslogtreecommitdiff
path: root/addons/mail/res_users.py
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-12-20 13:31:22 +0100
committerChristophe Matthieu <chm@openerp.com>2012-12-20 13:31:22 +0100
commit40b1c95e1a0932f4d1f87bf9894a169b2c9e57ff (patch)
treecf82c5ee2aa7b9c0ec93245dac84db44176dd80e /addons/mail/res_users.py
parent2315050bab19cd1ec7e087a6751c3ca96d6c34e6 (diff)
[IMP]mail: display checkbox for allow to add email (from email_from value) for creating partner and send email to this new partners.
bzr revid: chm@openerp.com-20121220123122-qsqn8w97t1tre3cq
Diffstat (limited to 'addons/mail/res_users.py')
-rw-r--r--addons/mail/res_users.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py
index 4c6bf6e150d..24c9c185d4d 100644
--- a/addons/mail/res_users.py
+++ b/addons/mail/res_users.py
@@ -116,8 +116,10 @@ class res_users(osv.Model):
alias_pool.unlink(cr, uid, alias_ids, context=context)
return res
+
def message_post_user_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False,
- attachment_ids=None, context=None, content_subtype='plaintext', **kwargs):
+ attachment_ids=None, extra_email=[],
+ context=None, content_subtype='plaintext', **kwargs):
""" 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.
@@ -128,8 +130,10 @@ class res_users(osv.Model):
if isinstance(thread_id, (list, tuple)):
thread_id = thread_id[0]
partner_id = self.browse(cr, uid, thread_id).partner_id.id
- return self.pool.get('res.partner').message_post_user_api(cr, uid, partner_id, body=body, subject=subject,
- parent_id=parent_id, attachment_ids=attachment_ids, context=context, content_subtype=content_subtype, **kwargs)
+ return self.pool.get('res.partner').message_post_user_api(cr, uid,
+ partner_id, body=body, subject=subject, parent_id=parent_id,
+ attachment_ids=attachment_ids, extra_email=extra_email,
+ context=context, content_subtype=content_subtype, **kwargs)
def message_post(self, cr, uid, thread_id, context=None, **kwargs):
""" Redirect the posting of message on res.users to the related partner.