Html 如何改变公司规模
我想更改销售订单和客户发票中的公司徽标大小,我用此代码编码,但尚未更改该徽标大小 这是我的密码:Html 如何改变公司规模,html,css,openerp,odoo-10,Html,Css,Openerp,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_
<?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>
我在style=“max-width:200px;max-height:150px;”中添加了代码,但没有更改。有人能帮我吗?尝试添加下面的宽度块css
style="max-width: 200px; max-height: 150px; display: block;"
尝试添加下面的宽度块css
style="max-width: 200px; max-height: 150px; display: block;"
您不能直接更改为外部布局。首先,您需要通过继承模板从报表模块更改标题布局
<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>
希望这对您有所帮助。您不能直接更改为外部布局。首先,您需要通过继承模板从报表模块更改标题布局
<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>
希望这有帮助……你为什么给这个问题贴上Python标签?你试过用这个药膏吗?你为什么给这个问题贴上标签?你试过用这个药膏吗?我尝试了这个方法,但仍然没有更改指定宽度和高度的方法。我还有一个错误,这个错误表示编译AST类型时出错。错误:在字符串格式化过程中未转换所有参数模板:1400路径:/templates/t/div[1]/div[1]/div[1]/img节点:在样式attr中指定宽度高度我只尝试一下这个,但仍然没有更改指定宽度和高度也有错误此=渲染时出错AST类型错误:在字符串格式设置过程中未转换所有参数模板:1400路径:/templates/t/t/div[1]/div[1]/img节点:仅在样式attr中指定宽度和高度我尝试使用此,但是没有改变。我尝试过这个,但没有改变。