帐户发票报告税表

6 html css openerp qweb odoo-9

我有服装模型,为发票报告添加一些字段,但我需要向上移动税表.我需要删除行.做这样的事情是完成的吗?

<xpath expr="//div[@class='row mt32 mb32']" position="attributes">
                <attribute name="class">row mt8 mb8</attribute>
            </xpath>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

编辑: 我正在扩展帐户发票报告插件/帐户/ report_invoice.xml以下是我要提升的表格.我不能通过这里的所有报告,因为它是大的.

EDIT2
https://github.com/odoo/odoo/blob/9.0/addons/account/views/report_invoice.xml链接到原始报告.我想沿着小计表向上移动税表.:)

   <div class="row">
                <div class="col-xs-4 pull-right">
                    <table class="table table-condensed">
                        <tr class="border-black">
                            <td><strong>Subtotal</strong></td>
                            <td class="text-right">
                                <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                            </td>
                        </tr>
                        <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
                            <tr>
                                <td><span t-esc="amount_by_group[0]"/></td>
                                <td class="text-right">
                                    <span t-esc="amount_by_group[1]"/>
                                </td>
                            </tr>
                        </t>
                        <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.currency_id"}'/>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="row" t-if="o.tax_line_ids">
                <div class="col-xs-6">
                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th>Tax</th>
                                <th class="text-right">Base</th>
                                <th class="text-right">Amount</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="o.tax_line_ids" t-as="t">
                                <td><span t-field="t.name"/></td>
                                <td class="text-right">
                                    <span t-field="t.base"
                                        t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                                </td>
                                <td class="text-right">
                                    <span t-field="t.amount"
                                        t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
Run Code Online (Sandbox Code Playgroud)

Emi*_*td. 1

您可以使用以下方式完成此操作:

在总计部分之前添加税表并删除现有的税表。

<template id="account_invoice_report_document_tax_table_ept" inherit_id="account.report_invoice_document">
    <xpath expr="//div[@t-if='o.tax_line_ids']" position="replace">
    </xpath>
    <xpath expr="//div[@class='col-xs-4 pull-right']" position="before">
        <div t-if="o.tax_line_ids">
        <div class="col-xs-6">
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th>Tax</th>
                        <th class="text-right">Base</th>
                        <th class="text-right">Amount</th>
                    </tr>
                </thead>
                <tbody>
                    <tr t-foreach="o.tax_line_ids" t-as="t">
                        <td><span t-field="t.name"/></td>
                        <td class="text-right">
                            <span t-field="t.base"
                                t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                        </td>
                        <td class="text-right">
                            <span t-field="t.amount"
                                t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    </xpath> 
</template>
Run Code Online (Sandbox Code Playgroud)

这可能对你有帮助。