Merge pull request #232 from odoo-dev/saas-4-mass_mailing-fixes-tde
[odoo/odoo.git] / addons / email_template / ir_actions_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record model="ir.ui.view" id="view_server_action_form_template">
6             <field name="name">ir.actions.server.form</field>
7             <field name="model">ir.actions.server</field>
8             <field name="inherit_id" ref="base.view_server_action_form"/>
9             <field name="arch" type="xml">
10                 <xpath expr="//page[@name='code']" position="after">
11                     <page string="Email" autofocus="autofocus"
12                             attrs="{'invisible': [('state', '!=', 'email')]}">
13                         <p attrs="{'invisible': [('model_id', '!=', False)]}">
14                             Please set the Base Model before setting the action details.
15                         </p>
16                         <group attrs="{'invisible': [('model_id', '=', False)]}">
17                             <field name="template_id"
18                                     on_change='on_change_template_id(template_id)'
19                                     attrs="{'required': [('state', '=', 'email')]}"/>
20                             <p colspan="2" attrs="{'invisible': [('template_id', '!=', False)]}">
21                                 Choose a template to display its values.
22                             </p>
23                             <p colspan="2" attrs="{'invisible': [('template_id', '=', False)]}">
24                                 The values displayed hereunder are informative. When sending the email, the values
25                                 will be taken from the email template.
26                             </p>
27                         </group>
28                         <group attrs="{'invisible': ['|', ('model_id', '=', False), ('template_id', '=', False)]}">
29                             <label for="email_from"/>
30                             <div>
31                                 <field name="email_from" nolabel="1'" readonly="1"
32                                         attrs="{'required': [('state', '=', 'email')]}"/>
33                                 <p attrs="{'invisible': [('email_from', '!=', False)]}">
34                                     Your template does not defined any email_from. Please update your template.
35                                 </p>
36                             </div>
37                             <field name="email_to" readonly="1"/>
38                             <field name="partner_to" readonly="1"/>
39                             <field name="subject" readonly="1" attrs="{'required': [('state', '=', 'email')]}"/>
40                             <field name="body_html" readonly="1" attrs="{'required': [('state', '=', 'email')]}"/>
41                         </group>
42                     </page>
43                 </xpath>
44             </field>
45         </record>
46
47     </data>
48 </openerp>