Something went wrong on our end
-
oury.balde authored
Rework on relations converters Remove deprecated field (ie: deserialize) Use converter on mail template model Updated the french translations
oury.balde authoredRework on relations converters Remove deprecated field (ie: deserialize) Use converter on mail template model Updated the french translations
mail_template_views.xml 2.36 KiB
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form view -->
<record id="view_email_template_form" model="ir.ui.view">
<field name="name">view_email_template_form</field>
<field name="model">mail.template</field>
<field name="inherit_id" ref="mail.email_template_form"/>
<field name="arch" type="xml">
<field name="model_id" position="after">
<field name="is_redner_template"/>
</field>
<!-- Hide HTML contents, superseded by the body produced by redner. -->
<xpath expr="//field[@name='body_html']" position="attributes">
<attribute name="attrs">{'invisible': [('is_redner_template', '=', True)]}</attribute>
</xpath>
<!-- Hide the single attachment selector too, not supported with redner. -->
<xpath expr="//field[@name='attachment_ids']" position="attributes">
<attribute name="attrs">{'invisible': [('is_redner_template', '=', True)]}</attribute>
</xpath>
<!-- Add redner fields instead of the above. -->
<xpath expr="//field[@name='body_html']" position="before">
<group string="Rednerd Template"
attrs="{'invisible': [('is_redner_template', '=', False)]}">
<field name="redner_tmpl_id"
attrs="{'required': [('is_redner_template', '=', True)]}" />
</group>
<button name="action_get_substitutions" type="object"
string="Get Substitutions from Rednerd Template"
attrs="{'invisible': [('is_redner_template', '=', False)]}" />
<group string="Substitutions"
attrs="{'invisible': [('is_redner_template', '=', False)]}">
<field name="redner_substitution_ids" nolabel="1">
<tree editable="top">
<field name="keyword" />
<field name="converter" />
<field name="value" />
</tree>
</field>
</group>
</xpath>
</field>
</record>
</odoo>