Saya mewarisi laporan qweb, sekarang saya ingin mengganti string Total Tanpa Pajak, Pajak, 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>

Adakah solusi sederhana atau contoh online?................................................

0
user_odoo 10 Maret 2017, 14:56

2 jawaban

Jawaban Terbaik

Silahkan coba kode ini :-

 <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
Hilar AK 15 Maret 2017, 07:03

Coba ini. Belum punya kesempatan untuk mengujinya.

<xpath expr="//table[contains(@class, 'table-condensed')]/tr[first()]/td[first()]" position="replace">
    <!-- YOUR XML HERE -->
</xpath>
1
Phillip Stack 10 Maret 2017, 18:41