首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >继承qweb报告并替换字符串odoo 9

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

Stack Overflow用户
提问于 2017-03-10 19:56:16
回答 2查看 1.3K关注 0票数 0

我正在继承qweb报表,现在我想替换字符串Total,不带Taxes,Taxes,Total

代码语言:javascript
复制
<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>

有任何简单的解决方案或在线示例吗?..................................

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-03-15 15:03:40

请尝试此代码:-

代码语言:javascript
复制
 <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>
票数 1
EN

Stack Overflow用户

发布于 2017-03-11 02:41:27

尝尝这个。还没有机会测试它。

代码语言:javascript
复制
<xpath expr="//table[contains(@class, 'table-condensed')]/tr[first()]/td[first()]" position="replace">
    <!-- YOUR XML HERE -->
</xpath>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42717859

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档