You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
278 lines
14 KiB
278 lines
14 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<template id="branch_external_layout" inherit_id="web.external_layout">
|
|
|
|
<xpath expr="//t[@t-if='company.external_report_layout_id']" position="before">
|
|
<t t-if="branch_id">
|
|
<t t-set="branch" t-value="branch_id"/>
|
|
</t>
|
|
<t t-elif="o and 'branch_id' in o and o.branch_id.sudo()">
|
|
<t t-set="branch" t-value="o.branch_id.sudo()"/>
|
|
</t>
|
|
<t t-else="else">
|
|
<t t-set="branch" t-value="res_branch"/>
|
|
</t>
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
<template id="branch_external_layout_background" inherit_id="web.external_layout_background">
|
|
<xpath expr="//div[hasclass('float-left')]" position="replace">
|
|
<t t-if="branch">
|
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id">
|
|
<div class="float-left company_address">
|
|
<div>
|
|
<strong t-field="company.partner_id.name"/>
|
|
<strong t-field="branch.name"/>
|
|
</div>
|
|
<div class="float-left company_address" t-if="branch.street" t-field="branch.street"/><br/>
|
|
<div class="float-left company_address" t-if="branch.street2" t-field="branch.street2"/><br/>
|
|
<div class="float-left company_address" t-if="branch.city" t-field="branch.city"/><br/>
|
|
<div class="float-left company_address" t-if="branch.zip" t-field="branch.zip"/><br/>
|
|
<div class="float-left company_address" t-if="branch.state_id" t-field="branch.state_id"/><br/>
|
|
<div class="float-left company_address" t-if="branch.country_id" t-field="branch.country_id"/>
|
|
</div>
|
|
</t>
|
|
<t t-else="else">
|
|
<div class="float-left company_address">
|
|
<div>
|
|
<strong t-field="company.partner_id.name"/>
|
|
</div>
|
|
<span t-field="company.partner_id" t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<div class="float-left company_address">
|
|
<div>
|
|
<strong t-field="company.partner_id.name"/>
|
|
</div>
|
|
<span t-field="company.partner_id" t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/>
|
|
</div>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.phone']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="branch.phone"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.email']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="branch.email"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="company.email"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="company.email"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.website']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="branch.website"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="company.website"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="company.website"/></li>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="branch_external_layout_boxed" inherit_id="web.external_layout_boxed">
|
|
<xpath expr="//span[hasclass('company_address')]" position="replace">
|
|
<t t-if="branch">
|
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id">
|
|
<span class="company_address" t-field="company.partner_id"/>,
|
|
<span class="company_address" t-field="branch.name"/><br/>
|
|
<span t-if="branch.street" t-field="branch.street"/><br/>
|
|
<span t-if="branch.street2" t-field="branch.street2"/><br/>
|
|
<span t-if="branch.city" t-field="branch.city"/>,
|
|
<span t-if="branch.zip" t-field="branch.zip"/><br/>
|
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/>
|
|
<span t-if="branch.country_id" t-field="branch.country_id"/>
|
|
</t>
|
|
<t t-else="else">
|
|
<div name="company_address" class="float-right mb4">
|
|
<span class="company_address" t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<div name="company_address" class="float-right mb4">
|
|
<span class="company_address" t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
|
|
</div>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.phone']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.phone" class="list-inline-item"><span class="o_force_ltr" t-field="branch.phone"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item"><span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item"><span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.email']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.email" class="list-inline-item"><span t-field="branch.email"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item"><span t-field="company.email"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item"><span t-field="company.email"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.website']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.website" class="list-inline-item"><span t-field="branch.website"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item"><span t-field="company.website"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item"><span t-field="company.website"/></li>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="branch_external_layout_clean" inherit_id="web.external_layout_clean">
|
|
<xpath expr="//li[@t-if='company.name']" position="after">
|
|
<t t-if="branch">
|
|
<strong><li t-if="branch.name"><span t-field="branch.name"/></li></strong>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.phone']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.phone">Tel: <span class="o_force_ltr" t-field="branch.phone"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.email']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.email"><span t-field="branch.email"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.email"><span t-field="company.email"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.email"><span t-field="company.email"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.website']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.website"><span t-field="branch.website"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.website"><span t-field="company.website"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.website"><span t-field="company.website"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//span[hasclass('company_address')]" position="replace">
|
|
<t t-if="branch">
|
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id">
|
|
<span t-if="branch.street" t-field="branch.street"/><br/>
|
|
<span t-if="branch.street2" t-field="branch.street2"/><br/>
|
|
<span t-if="branch.city" t-field="branch.city"/>,
|
|
<span t-if="branch.zip" t-field="branch.zip"/><br/>
|
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/>
|
|
<span t-if="branch.country_id" t-field="branch.country_id"/>
|
|
</t>
|
|
<t t-else="else">
|
|
<span class="company_address" t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<span class="company_address" t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="branch_external_layout_standard" inherit_id="web.external_layout_standard">
|
|
<xpath expr="//div[hasclass('col-6')]" position="replace">
|
|
<t t-if="branch">
|
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id">
|
|
<div class="col-6" name="company_address">
|
|
<span class="company_address" t-field="company.partner_id"/>,
|
|
<span class="company_address" t-field="branch.name"/><br/>
|
|
<span t-if="branch.street" t-field="branch.street"/><br/>
|
|
<span t-if="branch.street2" t-field="branch.street2"/><br/>
|
|
<span t-if="branch.city" t-field="branch.city"/>,
|
|
<span t-if="branch.zip" t-field="branch.zip"/><br/>
|
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/>
|
|
<span t-if="branch.country_id" t-field="branch.country_id"/>
|
|
</div>
|
|
</t>
|
|
<t t-else="else">
|
|
<div class="col-6" name="company_address">
|
|
<div t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
|
/>
|
|
</div>
|
|
</t>
|
|
|
|
</t>
|
|
<t t-else="else">
|
|
<div class="col-6" name="company_address">
|
|
<div t-field="company.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
|
/>
|
|
</div>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.phone']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="branch.phone"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="company.phone"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.email']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.email" class="list-inline-item d-inline"><span t-field="branch.email"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item d-inline"><span t-field="company.email"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.email" class="list-inline-item d-inline"><span t-field="company.email"/></li>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//li[@t-if='company.website']" position="replace">
|
|
<t t-if="branch">
|
|
<li t-if="branch.website" class="list-inline-item d-inline"><span t-field="branch.website"/></li>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item d-inline"><span t-field="company.website"/></li>
|
|
</t>
|
|
</t>
|
|
<t t-else="else">
|
|
<li t-if="company.website" class="list-inline-item d-inline"><span t-field="company.website"/></li>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|