Browse Source

[IMP] partner_brand: Split the template

12.0
Maxime Chambreuil 5 years ago
committed by OCA-git-bot
parent
commit
2a2fa78123
  1. 13
      partner_brand/views/report_template.xml

13
partner_brand/views/report_template.xml

@ -3,7 +3,7 @@
<!-- Copyright (C) 2019 Open Source Integrators <!-- Copyright (C) 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<template id="external_layout_standard"
<template id="external_layout_standard_logo"
inherit_id="web.external_layout_standard"> inherit_id="web.external_layout_standard">
<xpath expr="//img[@t-if='company.logo']" position="replace"> <xpath expr="//img[@t-if='company.logo']" position="replace">
@ -18,18 +18,26 @@
style="max-height: 45px;" alt="Logo"/> style="max-height: 45px;" alt="Logo"/>
</t> </t>
</xpath> </xpath>
</template>
<template id="external_layout_standard_address"
inherit_id="web.external_layout_standard">
<xpath expr="//div[@t-field='company.partner_id']" position="replace"> <xpath expr="//div[@t-field='company.partner_id']" position="replace">
<t t-if="'brand_id' in o.fields_get() and o.brand_id"> <t t-if="'brand_id' in o.fields_get() and o.brand_id">
<div t-field="o.brand_id.name"/>
<div t-field="o.brand_id" <div t-field="o.brand_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/>
</t> </t>
<t t-else=""> <t t-else="">
<div t-field="company.partner_id" <div t-field="company.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
</t> </t>
</xpath> </xpath>
</template>
<template id="external_layout_standard_footer"
inherit_id="web.external_layout_standard">
<xpath expr="//ul[hasclass('list-inline')]" position="replace"> <xpath expr="//ul[hasclass('list-inline')]" position="replace">
<t t-if="'brand_id' in o.fields_get() and o.brand_id"> <t t-if="'brand_id' in o.fields_get() and o.brand_id">
<ul class="list-inline mb4"> <ul class="list-inline mb4">
@ -67,7 +75,6 @@
</ul> </ul>
</t> </t>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>
Loading…
Cancel
Save