继承qweb报告并替换字符串odoo 9

Inherit qweb report and replace string odoo 9

我继承了 qweb 报告,现在我想替换字符串 Total Without Taxes, Taxes, Total

<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="//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>