Skip to content
Snippets Groups Projects
Commit c411b5a7 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Fix email template views, no separate tabs now

parent 5a1f37d4
No related branches found
No related tags found
No related merge requests found
......@@ -6,15 +6,8 @@
<field name="model">mail.template</field>
<field name="inherit_id" ref="mail.email_template_form"/>
<field name="arch" type="xml">
<!-- move subject field -->
<!--<xpath expr="//page/label[@for='subject']" position="replace" />
<xpath expr="//page/h2" position="replace" />-->
<!--<field name="model_id" position="before">
<field name="subject"/>
</field>-->
<field name="model_id" position="after">
<field name="is_redner_template"/>
</field>
......@@ -16,13 +9,15 @@
<field name="model_id" position="after">
<field name="is_redner_template"/>
</field>
<xpath expr="//page[1]" position="attributes">
<attribute name="attrs">{
'invisible':[
('is_redner_template', '=', True)
]}
</attribute>
<!-- 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>
......@@ -27,14 +22,15 @@
</xpath>
<xpath expr="//page[1]" position="after">
<page string="Rednerd" attrs="{
'invisible':[
('is_redner_template', '=', False)
]}">
<group string="Rednerd Template">
<field name="redner_tmpl_id" attrs="{
'required': [
('is_redner_template', '=', True)
]}"/>
</group>
<!-- 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)]}" />
......@@ -40,5 +36,12 @@
<button name="action_get_substitutions"
string="Get Substitutions from Rednerd Template"
type="object" colspan="2"/>
<group string="Substitutions"
attrs="{'invisible': [('is_redner_template', '=', False)]}">
<field name="redner_substitution_ids" nolabel="1">
<tree editable="top">
<field name="keyword" />
<field name="value" />
<field name="deserialize" />
</tree>
</field>
</group>
......@@ -44,12 +47,2 @@
<group string="Substitutions">
<field name="redner_substitution_ids" nolabel="1">
<tree editable="top">
<field name="keyword"/>
<field name="value"/>
<field name="deserialize" />
</tree>
</field>
</group>
</page>
</xpath>
......@@ -55,4 +48,5 @@
</xpath>
</field>
</record>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment