odoo/ext/custom-addons/dp_report/views/layouts.xml

59 lines
2.1 KiB
XML

<openerp>
<data>
<template id="report.external_layout">
<!-- Multicompany -->
<t t-if="not o and doc">
<t t-set="o" t-value="doc"/>
</t>
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-if="header == 1">
<t t-call="dp_report.external_layout_header"/>
</t>
<t t-if="header == 0">
<t t-call="dp_report.external_layout_header_blank"/>
</t>
<t t-raw="0"/>
<t t-call="report.external_layout_footer"/>
<t t-esc="header"/>
</template>
<!-- Report Header Full -->
<template id="external_layout_header">
<div class="header">
<div class="row">
<div class="col-xs-3" name="company_address">
<div t-field="company.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
style="border-bottom: 1px solid black;"/>
</div>
<div class="col-xs-9 text-right">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 105px;"/>
</div>
</div>
</div>
</template>
<!-- Report Header Blank -->
<template id="external_layout_header_blank">
<div class="header">
<div class="row">
<div class="col-xs-12" style="height: 45px;">
</div>
</div>
<div class="row">
<div class="col-xs-3" name="company_address">
<div t-field="company.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
style="border-bottom: 1px solid black;"/>
</div>
</div>
</div>
</template>
</data>
</openerp>