帐户发票报告税 table
Account invoice report tax table
我有服装模特,可以在发票报告中添加一些字段,但我需要提高税额 table up.do 我需要删除行。
是通过做这样的事情来完成的吗?
<xpath expr="//div[@class='row mt32 mb32']" position="attributes">
<attribute name="class">row mt8 mb8</attribute>
</xpath>
已编辑:
我正在扩展帐户发票报告 addons/account/report_invoice。xml 下面是我想向上移动的 table。我无法通过这里的所有报告,因为它太大了。
EDIT2
https://github.com/odoo/odoo/blob/9.0/addons/account/views/report_invoice.xml link 到原始报告。我想提高税收 table 以及小计 table。 :)
<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>
您可以通过以下方式完成:
在总计部分之前添加税 table 并删除现有部分。
<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>
这可能对您有所帮助。
我有服装模特,可以在发票报告中添加一些字段,但我需要提高税额 table up.do 我需要删除行。 是通过做这样的事情来完成的吗?
<xpath expr="//div[@class='row mt32 mb32']" position="attributes">
<attribute name="class">row mt8 mb8</attribute>
</xpath>
已编辑: 我正在扩展帐户发票报告 addons/account/report_invoice。xml 下面是我想向上移动的 table。我无法通过这里的所有报告,因为它太大了。
EDIT2
https://github.com/odoo/odoo/blob/9.0/addons/account/views/report_invoice.xml link 到原始报告。我想提高税收 table 以及小计 table。 :)
<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>
您可以通过以下方式完成:
在总计部分之前添加税 table 并删除现有部分。
<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>
这可能对您有所帮助。