odoo/OpenERP V8-QWEB报告模板丢失



系统:Odoo V8。

问题:在上一次PDF订单中,我发现不知何故模板没有应用。(只有扁平难看的文本)所有字段都在这里,包括页脚,但页眉不在这里,没有应用样式,也没有图片(在以前的报告中是默认的)所有PDF报告都发生了同样的情况所以我想我不知怎么更改或杀死了模板。我该怎么修?

之前:安装后一切正常。基本模板已应用,适用于销售和采购PDF文件。

更新:公司设置中的模型内容(设置=>报告选项卡下的公司)是正确的(当我预览页面时,一切都好)

external_layout qview为:

<?xml version="1.0"?>
<t t-name="report.external_layout">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-call="report.external_layout_header"/>
<t t-raw="0"/>
<t t-call="report.external_layout_footer"/>
</t>

external_layout_header的qview是(我们可以清楚地看到对RML头的调用,这是预期的):

<?xml version="1.0"?>
<t t-name="report.external_layout_header">
<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-height: 45px;"/>
</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 class="row">
<div class="col-xs-3">
<div t-field="company.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" style="border-bottom: 1px solid black;"/>
</div>
</div>
</div>
</t>

页脚和页眉似乎都包含在内。但是所有PDF报告的结果是:-无标题-内容可以(但没有字体和样式)-页脚可以(但没有字体或样式)

谢谢

你好Stephane TAMPIGNY,

Plase阅读这篇文章

点击查看您质疑帖子的答案参考

我希望这对你有帮助

我发现我的问题与此类似:https://github.com/odoo/odoo/issues/1105

这是由于web.base.url值不同,这取决于在一个地方或另一个地方工作。然后我就把它固定为最常见的值,并且将不得不忘记在一些带有隧道的计算机上工作。检查详细信息以固定值:https://bugs.launchpad.net/openobject-server/+bug/1295022

最新更新