代码:
<openerp>
<data>
<template id="report_saleorder_insurance_inherit" inherit_id="sale.report_saleorder_document">
<xpath expr="//div[@class='row']/div[@class='col-xs-4 pull-right']/table/tr[2]" position="after">
<tr>
<td>Insurance</td>
<td class="text-right">
<span t-field="o.amount_insurance" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
</xpath>
</template>
</data>
</openerp>
此代码应在销售订单成本中添加一行,但更新后不显示任何内容。
我已将xml添加到__openerp__.py
文件中,然后重新启动服务。模块更新没有任何错误。我不知道为什么它不起作用。我忘了什么吗?
xpath应该在核心xml的这一部分内添加一行:
(取自report_saleorder.xml
)
<div class="row">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<td>
<strong>Total Without Taxes</strong>
</td>
<td class="text-right">
<span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="o.amount_tax" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr class="border-black">
<td>
<strong>Total</strong>
</td>
<td class="text-right">
<span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</div>
答案 0 :(得分:0)
尝试创建新的销售订单并进行打印。某些报告保存在数据库中(在ir_attachment
表中)。在第一次打印报告后,Odoo会恢复已经从数据库中首次打印的报告,但您无法看到更改