Openerp 继承qweb报告并替换字符串odoo 9
我是继承qweb报表,现在我要替换字符串Total,不含税,税,总计Openerp 继承qweb报告并替换字符串odoo 9,openerp,odoo-9,qweb,Openerp,Odoo 9,Qweb,我是继承qweb报表,现在我要替换字符串Total,不含税,税,总计 <div class="row" name="total"> <div class="col-xs-4 pull-right"> <table class="table table-condensed"> <tr class="border-black">
<div class="row" name="total">
<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="doc.amount_untaxed"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="doc.amount_tax"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="doc.amount_total"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</div>
<xpath expr="?????" position="replace">
</xpath>
不含税总额
税
总计
任何简单的解决方案或在线示例?……试试这个。我还没有机会测试它
<xpath expr="//table[contains(@class, 'table-condensed')]/tr[first()]/td[first()]" position="replace">
<!-- YOUR XML HERE -->
</xpath>
试试这个。我还没有机会测试它
<xpath expr="//table[contains(@class, 'table-condensed')]/tr[first()]/td[first()]" position="replace">
<!-- YOUR XML HERE -->
</xpath>
请尝试以下代码:-
<xpath expr="//div[@name='total']" position="replace">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<!--Add your Custom String-->
<td><strong>Custom String</strong></td>
<td class="text-right">
<span t-field="doc.amount_untaxed"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<!--Add your Custom String for taxes-->
<td>Custom String</td>
<td class="text-right">
<span t-field="doc.amount_tax"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr class="border-black">
<!--Add your Custom String for Total-->
<td><strong>Custom String</strong></td>
<td class="text-right">
<span t-field="doc.amount_total"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</xpath>
自定义字符串
自定义字符串
自定义字符串
请尝试以下代码:-
<xpath expr="//div[@name='total']" position="replace">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<!--Add your Custom String-->
<td><strong>Custom String</strong></td>
<td class="text-right">
<span t-field="doc.amount_untaxed"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<!--Add your Custom String for taxes-->
<td>Custom String</td>
<td class="text-right">
<span t-field="doc.amount_tax"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr class="border-black">
<!--Add your Custom String for Total-->
<td><strong>Custom String</strong></td>
<td class="text-right">
<span t-field="doc.amount_total"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</xpath>
自定义字符串
自定义字符串
自定义字符串
Tnx表示答案,但在xpath中放入任何内容后,控制台中出现错误…Tnx表示答案,但在xpath中放入任何内容后,控制台中出现错误。。。