diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-02-25 17:48:57 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-02-25 17:48:57 +0100 |
| commit | 0aaca4daa92bcaba2a981de11c136689fe80209c (patch) | |
| tree | 1a336747f11edb6ae7b02cf03954d1c430d946e8 /addons/mail/wizard/mail_compose_message_view.xml | |
| parent | 22afd0cefdc3f5547757ce5ae79c3839cee61e47 (diff) | |
[IMP] mail: improved mass mailing. Correctly take into account email_to, email_cc, partner_to even if no template. Mass mailing is a no-subtype post with additional recipients manually notified. Added option (in technical features) to send to followers, or to directly create a mail_mail. Added some default values in mail_message. Added explicit management of email_from and reply_to. Having a reply_to bypasses the 'model-res_id' in message_id behavior allowing to construct threads. Added explicit recipient_ids field on mail_mail that replaces the recipient_ids parameter in mail_mail.send(). Updated tests accordingly.
bzr revid: tde@openerp.com-20130225164857-i635atksj7riq9nd
Diffstat (limited to 'addons/mail/wizard/mail_compose_message_view.xml')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message_view.xml | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml index fca5ec65ca0..29a305a0462 100644 --- a/addons/mail/wizard/mail_compose_message_view.xml +++ b/addons/mail/wizard/mail_compose_message_view.xml @@ -12,25 +12,31 @@ <field name="model" invisible="1"/> <field name="res_id" invisible="1"/> <field name="parent_id" invisible="1"/> + <field name="post" groups="base.group_no_one"/> + <field name="notify" groups="base.group_no_one"/> <!-- visible wizard --> - <label for="partner_ids" string="Recipients"/> - <div groups="base.group_user"> - <span attrs="{'invisible':['|', ('model', '=', False), ('composition_mode', '!=', 'mass_mail')]}"> - Followers of selected items and - </span> - <span attrs="{'invisible':['|', ('model', '=', False), ('composition_mode', '=', 'mass_mail')]}"> + <field name="email_from" + attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/> + <label for="partner_ids" string="Recipients" + attrs="{'invisible':[('composition_mode', '=', 'mass_mail')]}"/> + <div groups="base.group_user" + attrs="{'invisible':[('composition_mode', '=', 'mass_mail')]}"> + <span attrs="{'invisible':[('model', '=', False)]}"> Followers of - <field name="record_name" readonly="1" class="oe_inline" - attrs="{'invisible':[('model', '=', False)]}"/> - and + <field name="record_name" readonly="1" class="oe_inline"/> + and </span> <field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..." context="{'force_email':True, 'show_email':True}"/> </div> - <field name="subject" placeholder="Subject..."/> + <field name="same_thread"/> + <field name="reply_to" placeholder="Email address te redirect replies..." + attrs="{'invisible':[('same_thread', '=', True)], + 'required':[('same_thread', '!=', True)]}"/> + <field name="subject" placeholder="Subject..." required="True"/> </group> <field name="body"/> - <field name="attachment_ids" widget="many2many_binary"/> + <field name="attachment_ids" widget="many2many_binary" string="Attach a file"/> <footer> <button string="Send" name="send_mail" type="object" class="oe_highlight"/> or @@ -59,6 +65,9 @@ target="new" key2="client_action_multi" id="base.action_partner_mass_mail" - context="{'default_composition_mode': 'mass_mail'}"/> + context="{ + 'default_composition_mode': 'mass_mail', + 'default_partner_to': '${object.id or \'\'}', + }"/> </data> </openerp> |
