odoo学习记录2
文件样式布局XML代码
<?xml version="1.0"?>
<t t-name="web.external_layout_clean">
<div t-attf-class="header o_company_#{company.id}_layout">
<div class="o_clean_header">
<div class="row">
<div class="col-6">
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" alt="Logo"/>
</div>
<div class="col-5 offset-1" name="company_address">
<ul class="list-unstyled">
<strong><li t-if="company.name"><span t-field="company.name"/></li></strong>
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'Tax ID'"/>: <span t-field="company.vat"/></li>
<li t-if="company.phone">Tel: <span t-field="company.phone"/></li>
<li t-if="company.email"><span t-field="company.email"/></li>
<li t-if="company.website"><span t-field="company.website"/></li>
</ul>
</div>
</div>
</div>
</div>
<div t-attf-class="article o_report_layout_clean o_company_#{company.id}_layout" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
<t t-call="web.address_layout"/>
<t t-raw="0"/>
</div>
<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout">
<div class="row mt8">
<div class="col-3">
<span t-field="company.report_footer"/>
</div>
<div class="col-4 text-right">
<span class="company_address" t-field="company.partner_id" t-options="{"widget": "contact", "fields": ["address"], "no_marker": true}"/>
</div>
<div class="col-4">
<h4 class="mt0 mb0 text-uppercase" t-field="company.report_header"/>
</div>
<div class="col-1">
<ul t-if="report_type == 'pdf'" class="list-inline pagenumber float-right text-center">
<li class="list-inline-item"><strong><span class="page"/></strong></li>
</ul>
</div>
</div>
</div>
</t>