[IMP] pre-commit run -a

pull/1072/head
Jairo Llopis 2021-01-26 14:06:17 +00:00 committed by Dũng (Trần Đình)
parent 2feb0bf181
commit 5b2ef9af7c
3 changed files with 19 additions and 7 deletions

View File

@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<template id="view_email_template_corporate_identity"> <template id="view_email_template_corporate_identity">
<body> <body>
<html> <html>
<img style="float: right" t-attf-src="data:image;base64,{{env.user.company_id.logo}}" /> <img
style="float: right"
t-attf-src="data:image;base64,{{env.user.company_id.logo}}"
/>
<!-- if some template calling us sets this variable, <!-- if some template calling us sets this variable,
we print a h1 tag /--> we print a h1 tag /-->
<h1 t-if="email_heading"><t t-esc="email_heading" /></h1> <h1 t-if="email_heading"><t t-esc="email_heading" /></h1>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<record id="email_template_demo1" model="mail.template"> <record id="email_template_demo1" model="mail.template">
<field name="name">QWeb demo</field> <field name="name">QWeb demo</field>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<record id="email_template_form" model="ir.ui.view"> <record id="email_template_form" model="ir.ui.view">
<field name="model">mail.template</field> <field name="model">mail.template</field>
@ -9,12 +9,21 @@
</field> </field>
<field name="body_html" position="before"> <field name="body_html" position="before">
<group attrs="{'invisible': [('body_type', '!=', 'qweb')]}"> <group attrs="{'invisible': [('body_type', '!=', 'qweb')]}">
<field name="body_view_id" attrs="{'required': [('body_type', '=', 'qweb')]}" /> <field
<field name="body_view_arch" widget="ace" attrs="{'required': [('body_type', '=', 'qweb')], 'invisible': [('body_view_id', '=', False)]}" /> name="body_view_id"
attrs="{'required': [('body_type', '=', 'qweb')]}"
/>
<field
name="body_view_arch"
widget="ace"
attrs="{'required': [('body_type', '=', 'qweb')], 'invisible': [('body_view_id', '=', False)]}"
/>
</group> </group>
</field> </field>
<field name="body_html" position="attributes"> <field name="body_html" position="attributes">
<attribute name="attrs">{'invisible': [('body_type', '!=', 'jinja2')]}</attribute> <attribute
name="attrs"
>{'invisible': [('body_type', '!=', 'jinja2')]}</attribute>
</field> </field>
</field> </field>
</record> </record>