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 | |
| parent | c5e395ec499688a566d203551ff02c470bd6b6bf (diff) | |
[IMP] Chatter: full wizard composer does not display recipients in 'log' mode.
bzr revid: tde@openerp.com-20130226125038-bgpmfrmt3v44i870
| -rw-r--r-- | addons/mail/static/src/css/mail.css | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 3 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 6 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message_view.xml | 5 |
4 files changed, 12 insertions, 4 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 50e7fed78b0..e191e881543 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -235,7 +235,7 @@ word-spacing: 3px; cursor: text; } -.openerp .oe_mail .oe_msg.oe_msg_composer_compact .oe_compact_record{ +.openerp .oe_mail .oe_msg.oe_msg_composer_compact .oe_compact_record { font-size: 13px; font-style: bold; text-align: center; diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index bb200aedf95..9d9f07671e6 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -545,6 +545,9 @@ openerp.mail = function (session) { 'default_attachment_ids': self.attachment_ids, 'default_partner_ids': partner_ids, }; + if (self.is_log) { + _.extend(context, {'mail_compose_log': true}); + } if (default_composition_mode != 'reply' && self.context.default_model && self.context.default_res_id) { context.default_model = self.context.default_model; context.default_res_id = self.context.default_res_id; 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> |
