This question has been flagged
2 Replies
7410 Views

I want to change Logo company size in Sale Order and Custommer Invoice, I code with this but haven't changed that logo size.

here's my code:


<?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>


I have add code in style="max-width: 200px; max-height: 150px;" but haven't change. somebody can help me?

Avatar
Discard
Best Answer

change max-width and max-height attributes value. you can use following attributes to make image styles here

Avatar
Discard
Author Best Answer

0 down vote accept

I create new module not inherit, I create header but the logo still not show, how to fix it?

<div class="header">
    <div class="row">
        <div class="col-xs-3">
            <img t-att-src="'static/src/img/L.png'" style="max-height: 65px;"/>
        </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>
Avatar
Discard