<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <!-- Email Template Preview -->
        <record model="ir.ui.view" id="email_template_preview_form">
            <field name="name">email_template.preview.form</field>
            <field name="model">email_template.preview</field>
            <field name="arch" type="xml">
                <form string="Email Preview" version="7.0">
                    <div>
                        <h2>Preview of <field name="name" readonly="1" class="oe_inline"/></h2>
                        <field name="model_id" invisible="1"/>
                        <h3>Using sample document
                        <field name="res_id" on_change="on_change_res_id(res_id, context)" class="oe_inline"/>
                        </h3>
                    </div>
                    <group>
                      <field name="email_from" readonly="1"/>
                      <field name="email_to" readonly="1"/>
                      <field name="email_recipients" readonly="1"/>
                      <field name="email_cc" readonly="1" attrs="{'invisible':[('email_cc','=',False)]}"/>
                      <field name="reply_to" readonly="1" attrs="{'invisible':[('reply_to','=',False)]}"/>
                      <field name="subject" readonly="1"/>
                      <field name="body_html" widget="html" readonly="1" options='{"safe": True}'/>
                    </group>
                </form>
            </field>
        </record>

        <record id="wizard_email_template_preview" model="ir.actions.act_window">
            <field name="name">Template Preview</field>
            <field name="res_model">email_template.preview</field>
            <field name="src_model">email_template.preview</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="auto_refresh" eval="1" />
            <field name="target">new</field>
            <field name="context">{'template_id':active_id}</field>
        </record>

    </data>
</openerp>
