summaryrefslogtreecommitdiff
path: root/addons/product_email_template/views/product_views.xml
blob: 185ee9d3127316a12d9f0f26f02978dcd9aaf846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="utf-8"?>
<odoo>
        <record id="product_template_form_view" model="ir.ui.view">
            <field name="name">product.template.form.inherit.email.template</field>
            <field name="model">product.template</field>
            <field name="inherit_id" ref="product.product_template_form_view"/>
            <field name="arch" type="xml">
                <xpath expr="//page[@name='sales']//group[@name='sale']" position="inside">
                    <group name="email_template" string="Automatic Email at Invoice">
                        <field name="email_template_id" string="Email Template" help="Send a product-specific email once the invoice is validated"
                            domain="[('model','=','account.move')]"
                            context="{
                                'form_view_ref':'product_email_template.email_template_form_simplified',
                                'default_model': 'account.move',
                                'default_subject': name,
                                'default_name': name,
                            }"/>
                    </group>
                </xpath>
            </field>
        </record>
</odoo>