<?xml version="1.0"?>
<form string="Templates">
                    <header>
                        <field name="ref_ir_act_window" invisible="1"/>
                        <field name="template_fs" invisible="1"/>
                        <field name="is_template_editor" invisible="1"/>
                        <button string="Preview" name="102" type="action" class="btn-primary" target="new"/>
                        <button string="Reset Template" name="103" type="action" groups="mail.group_mail_template_editor" invisible="not template_fs"/>
                        <button string="Add Context Action" class="btn btn-secondary" name="create_action" type="object" groups="base.group_system" invisible="ref_ir_act_window" help="Display an option on related documents to open a composition wizard with this template"/>
                        <button string="Remove Context Action" class="btn btn-secondary" name="unlink_action" type="object" groups="base.group_no_one" invisible="not ref_ir_act_window" help="Remove the contextual action to use this template on related documents"/>
                    </header>
                    <sheet>
                        <div class="oe_title">
                            <label for="name"/>
                            <h1><field name="name" class="w-100" required="1" placeholder="e.g. &quot;Welcome email&quot;"/></h1>
                            <group>
                                <field name="model_id" placeholder="e.g. Contact" required="1" options="{'no_create': True}"/>
                                <field name="subject" options="{'dynamic_placeholder': true}" placeholder="e.g. &quot;Welcome to MyCompany&quot; or &quot;Nice to meet you, {{ object.name }}&quot;"/>
                                <field name="model" invisible="1"/>
                            </group>
                        </div>
                        <notebook>
                            <page string="Content" name="content">
                                <field name="can_write" invisible="1"/>
                                <field name="body_html" widget="html_mail" class="oe-bordered-editor" options="{'codeview': true, 'dynamic_placeholder': true, 'allowCommandVideo': false}" readonly="not can_write and id"/>
                                <div class="d-flex align-items-center gap-3">
                                    <field name="attachment_ids" widget="many2many_binary" class="m-0"/>
                                    <div class="text-muted">Write /field to insert dynamic content</div>
                                </div>
                            </page>
                            <page string="Email Configuration" name="email_configuration">
                                <group>
                                    <field name="email_from" placeholder="Override author's email"/>
                                    <field name="use_default_to"/>
                                    <field name="email_to" invisible="use_default_to" placeholder="Comma-separated recipient addresses"/>
                                    <field name="partner_to" invisible="use_default_to" placeholder="Comma-separated ids of recipient partners"/>
                                    <field name="email_cc" invisible="use_default_to" placeholder="Comma-separated carbon copy recipients addresses"/>
                                    <field name="reply_to" placeholder="Email address to which replies will be redirected when sending emails in mass"/>
                                    <field name="scheduled_date" string="Scheduled Send Date"/>
                                </group>
                            </page>
                            <page string="Settings" name="email_settings">
                                <group col="2">
                                    <group>
                                        <field name="lang" placeholder="{{ object.partner_id.lang }}"/>
                                        <field name="mail_server_id"/>
                                        <field name="auto_delete"/>
                                        <field name="report_template_ids" domain="[('model','=',model)]" widget="many2many_tags" options="{'no_create': True}"/>
                                    </group>
                                    <group>
                                        <field name="user_id" widget="many2one_avatar_user" readonly="not is_template_editor" invisible="not is_template_editor" placeholder="Shared with all users." help="If set, will restrict the template to this specific user.                                                   If not set, shared with all users."/>
                                        <field name="description"/>
                                    </group>
                                </group>
                            </page>
                        </notebook>
                       </sheet>
                </form>
            