欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

odoo学习记录2

程序员文章站 2022-06-02 17:26:56
...

odoo学习记录2

文件样式布局XML代码

odoo学习记录2

<?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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;], &quot;no_marker&quot;: 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>
相关标签: erp