Maxime Chambreuil
5 years ago
committed by
OCA-git-bot
2 changed files with 81 additions and 5 deletions
@ -0,0 +1,78 @@ |
|||
<odoo> |
|||
|
|||
<!-- Copyright (C) 2019 Open Source Integrators |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
|||
|
|||
<template id="external_layout_standard" |
|||
inherit_id="web.external_layout_standard"> |
|||
|
|||
<xpath expr="//img[@t-if='company.logo']" position="replace"> |
|||
<t t-if="'brand_id' in o.fields_get()"> |
|||
<img t-if="o.brand_id" |
|||
t-att-src="image_data_uri(o.brand_id.image)" |
|||
style="max_height: 45px;" alt="Logo"/> |
|||
<img t-elif="company.logo" |
|||
t-att-src="image_data_uri(company.logo)" |
|||
style="max_height: 45px;" alt="Logo"/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<img t-if="company.logo" |
|||
t-att-src="image_data_uri(company.logo)" |
|||
style="max_height: 45px;" alt="Logo"/> |
|||
</t> |
|||
</xpath> |
|||
|
|||
<xpath expr="//div[@t-field='company.partner_id']" position="replace"> |
|||
<t t-if="'brand_id' in o.fields_get()"> |
|||
<div t-if="o.brand_id" t-field="o.brand_id" |
|||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
|||
<div t-else="else" t-field="company.partner_id" |
|||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div t-field="company.partner_id" |
|||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
|||
</t> |
|||
</xpath> |
|||
|
|||
<xpath expr="//ul[hasclass('list-inline')]" position="replace"> |
|||
<t t-if="'brand_id' in o.fields_get()"> |
|||
<ul t-if="o.brand_id" class="list-inline mb4"> |
|||
<li t-if="o.brand_id.phone" class="list-inline-item"> |
|||
Phone: |
|||
<span t-field="o.brand_id.phone"/> |
|||
</li> |
|||
<li t-if="o.brand_id.email" class="list-inline-item"> |
|||
Email: |
|||
<span t-field="o.brand_id.email"/> |
|||
</li> |
|||
<li t-if="o.brand_id.website" class="list-inline-item"> |
|||
Web: |
|||
<span t-field="o.brand_id.website"/> |
|||
</li> |
|||
</ul> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul t-if="company" class="list-inline mb4"> |
|||
<li t-if="company.phone" |
|||
class="list-inline-item"> |
|||
Phone: |
|||
<span t-field="company.phone"/> |
|||
</li> |
|||
<li t-if="company.email" |
|||
class="list-inline-item"> |
|||
Email: |
|||
<span t-field="company.email"/> |
|||
</li> |
|||
<li t-if="company.website" |
|||
class="list-inline-item"> |
|||
Web: |
|||
<span t-field="company.website"/> |
|||
</li> |
|||
</ul> |
|||
</t> |
|||
</xpath> |
|||
|
|||
</template> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue