diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-02-26 13:50:38 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-02-26 13:50:38 +0100 |
| commit | d2e1ff39cc55b91c396b05981808b8a3df655a5a (patch) | |
| tree | 0de18f51b5ae6b4e48b19a5a7c4da6547e73ce90 /addons/mail/wizard | |
| parent | c5e395ec499688a566d203551ff02c470bd6b6bf (diff) | |
[IMP] Chatter: full wizard composer does not display recipients in 'log' mode.
bzr revid: tde@openerp.com-20130226125038-bgpmfrmt3v44i870
Diffstat (limited to 'addons/mail/wizard')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 6 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message_view.xml | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 3617bd76463..5776a8e46c5 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -191,6 +191,7 @@ class mail_compose_message(osv.TransientModel): if context is None: context = {} active_ids = context.get('active_ids') + is_log = context.get('mail_compose_log', False) for wizard in self.browse(cr, uid, ids, context=context): mass_mail_mode = wizard.composition_mode == 'mass_mail' @@ -216,7 +217,10 @@ class mail_compose_message(osv.TransientModel): post_values['attachments'] += new_attachments post_values.update(email_dict) # post the message - active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype='mt_comment', context=context, **post_values) + subtype = 'mail.mt_comment' + if is_log: + subtype = False + active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **post_values) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml index fca5ec65ca0..00ba33a6d6f 100644 --- a/addons/mail/wizard/mail_compose_message_view.xml +++ b/addons/mail/wizard/mail_compose_message_view.xml @@ -13,8 +13,9 @@ <field name="res_id" invisible="1"/> <field name="parent_id" invisible="1"/> <!-- visible wizard --> - <label for="partner_ids" string="Recipients"/> - <div groups="base.group_user"> + <label for="partner_ids" string="Recipients" + invisible="context.get('mail_compose_log', False)"/> + <div groups="base.group_user" invisible="context.get('mail_compose_log', False)"> <span attrs="{'invisible':['|', ('model', '=', False), ('composition_mode', '!=', 'mass_mail')]}"> Followers of selected items and </span> |
