如何更改徽标公司大小

Ftr*_*Ftr 1 html css odoo odoo-10

我想更改销售订单和客户发票中的徽标公司尺寸,我用它进行编码,但没有更改该徽标尺寸。

这是我的代码:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="co_report_saleorder_document">
    <t t-call="report.external_layout">
        <t t-set="docs" t-value="docs.with_context({'lang':docs.partner_id.lang})" />

        <!-- 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 t-if="not o or not 'company_id' in o">
            <t t-set="company" t-value="res_company"></t>
        </t>

        <div class="header">
            <div class="row">
                <div class="col-xs-3">
                    <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-width: 200px; max-height: 150px;"/>
                </div>
                <div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
            </div>
            <div class="row zero_min_height">
                <div class="col-xs-12">
                    <div style="border-bottom: 1px solid black;"></div>
                </div>
            </div>
        </div>

</template>


<template id="report_saleorder">
    <t t-call="report.html_container">
        <t t-foreach="docs" t-as="docs">
            <t t-call="sale.fal_report_saleorder_document" t-lang="docs.partner_id.lang"/>
        </t>
    </t>
</template>

<report
    string="Cetak Sales"
    id="co_view_sale"
    model="sale.order"
    report_type="qweb-pdf"
    name="co_sale_report.co_report_saleorder_document"
    file="co_sale_report.co_report_saleorder_document"
/>

</odoo>
Run Code Online (Sandbox Code Playgroud)

我在 style="max-width: 200px; max-height: 150px;" 中添加了代码 但没有改变。有人可以帮助我吗?

小智 5

您不能直接更改为外部布局。首先,您需要通过继承模板来更改报告模块的标题布局。

<template id="external_layout_header_inherited" inherit_id="report.external_layout_header" primary="True">
<xpath expr="//img" position="replace">
    <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" height='150' width='200' />
</xpath></template>
Run Code Online (Sandbox Code Playgroud)

希望这有帮助......