1 <?xml version="1.0" encoding="utf-8"?>
4 <record model="ir.ui.view" id="email_compose_message_wizard_form">
5 <field name="name">mail.compose.message.form</field>
6 <field name="model">mail.compose.message</field>
7 <field name="arch" type="xml">
8 <form string="Compose Email" version="7.0">
9 <field name="composition_mode" nolabel="1" invisible="1"/>
10 <field name="model" nolabel="1" invisible="1"/>
11 <field name="res_id" nolabel="1" invisible="1"/>
12 <field name="parent_id" nolabel="1" invisible="1"/>
13 <field name="content_subtype" nolabel="1" invisible="1"/>
15 <field name="subject" placeholder="Subject..."/>
16 <field name="partner_ids" widget="many2many_tags" placeholder="Add contacts to notify..."
17 context="{'force_create':True}"
18 on_change="onchange_partner_ids(partner_ids)"/>
22 <field name="body_text" nolabel="1"
23 attrs="{'invisible':[('content_subtype', '=', 'html')]}"/>
24 <field name="body" nolabel="1"
25 attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
27 <page string="Attachments">
28 <field name="attachment_ids" colspan="4" nolabel="1"/>
32 <button string="Send" name="send_mail" type="object" class="oe_highlight" />
34 <button string="Cancel" class="oe_link" special="cancel" />
35 <div class="oe_right">
36 <button string="" name="toggle_content_subtype" type="object" icon="/mail/static/src/img/formatting.png"
37 help="Toggle advanced formatting mode"/>
44 <record model="ir.ui.view" id="email_compose_message_wizard_form_chatter">
45 <field name="name">mail.compose.message.form.chatter</field>
46 <field name="model">mail.compose.message</field>
47 <field name="priority">18</field>
48 <field name="arch" type="xml">
49 <form string="Compose Email" version="7.0" >
51 <!-- truly invisible fields for control and options -->
52 <field name="composition_mode" colspan="2" nolabel="1" invisible="1"/>
53 <field name="model" colspan="2" nolabel="1" invisible="1"/>
54 <field name="res_id" colspan="2" nolabel="1" invisible="1"/>
55 <field name="parent_id" colspan="2" nolabel="1" invisible="1"/>
56 <field name="content_subtype" colspan="2" nolabel="1" invisible="1"/>
57 <!-- visible wizard -->
58 <field name="subject" colspan="2" nolabel="1" placeholder="Subject..."
59 class="oe_mail_compose_message_subject"
60 attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
61 <field name="body_text" colspan="2" nolabel="1" placeholder="What are you working on ?"
62 class="oe_mail_compose_message_body"
63 attrs="{'invisible':[('content_subtype', '=', 'html')]}"/>
64 <field name="body" colspan="2" nolabel="1" placeholder="What are you working on ?"
65 class="oe_mail_compose_message_body_html"
66 attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
67 <field name="partner_ids" colspan="2" nolabel="1" widget="many2many_tags" placeholder="Add contacts to notify..."
68 context="{'force_create':True}"
69 on_change="onchange_partner_ids(partner_ids)"
70 class="oe_mail_compose_message_partner_ids"/>
71 <field name="attachment_ids" colspan="2" nolabel="1" widget="many2many_tags"
72 placeholder="Add attachments..." invisible="1"
73 class="oe_mail_compose_message_attachment_ids"/>
74 <!-- void div to display attachments, Chatter-controlled -->
75 <div colspan="2" class="oe_mail_compose_message_attachments"/>
76 <!-- buttons, with as few Chatter logic as possible -->
78 <button name="send_mail" string="Post" type="object"
79 class="oe_mail_compose_message_button_send"/>
81 <div class='oe_mail_compose_message_icons'>
82 <button icon="/mail/static/src/img/attachment.png"
83 class="oe_mail_compose_message_attachment" string=""
85 help="Add an attachment"/>
86 <button icon="/mail/static/src/img/formatting.png"
87 class="oe_mail_compose_message_formatting" string=""
88 type="object" name="toggle_content_subtype"
89 help="Toggle advanced formatting mode"/>
96 <record id="action_email_compose_message_wizard" model="ir.actions.act_window">
97 <field name="name">Compose Email</field>
98 <field name="res_model">mail.compose.message</field>
99 <field name="src_model">mail.compose.message</field>
100 <field name="type">ir.actions.act_window</field>
101 <field name="view_type">form</field>
102 <field name="view_mode">form</field>
103 <field name="target">new</field>
106 <!-- Replace the default mass-mailing wizard in base with the composition wizard -->
107 <act_window name="Mass Mailing"
108 res_model="mail.compose.message"
109 src_model="res.partner"
112 key2="client_action_multi"
113 id="base.action_partner_mass_mail"
114 context="{'default_composition_mode': 'mass_mail'}"/>