【发布时间】:2018-05-22 21:46:21
【问题描述】:
我创建了一个继承sale.report_saleorder 的自定义报告,我正在尝试添加自定义标题。
<openerp>
<data>
<template id="report_saleorder_inherit" inherit_id="sale.report_saleorder">
<xpath expr="t" position="before">
<div class="head_wrap">
<div class="row">
<div class="col-xs-3">
<img t-if="res_company.logo" t-att-src="'data:image/png;base64,%s' %res_company.logo"
style="max-height: 45px;" />
</div>
<div class="col-xs-9 text-right" style="margin-top:20px;"
t-field="res_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 class="row">
<div class="col-xs-6" name="company_address">
<span t-field="res_company.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
style="border-bottom: 1px solid black; display:inline-block;" />
</div>
</div>
</div>
</xpath>
</template>
</data>
</openerp>
当我选择报告格式为“HTML”时,它可以正常工作。但是当我将它打印为“PDF”时,它不会呈现我的标题。有解决方案吗?如何打印带有标题的报告?
【问题讨论】:
-
您解决了吗?我也遇到了同样的问题。
标签: header report odoo-10 odoo