gpt4 book ai didi

html - 账户发票报表税表

转载 作者:太空狗 更新时间:2023-10-29 15:15:56 27 4
gpt4 key购买 nike

我有服装模型,可以在发票报告中添加一些字段,但我需要上移税表。我需要删除行吗?是通过做这样的事情来完成的吗?

<xpath expr="//div[@class='row mt32 mb32']" position="attributes">
<attribute name="class">row mt8 mb8</attribute>
</xpath>

enter image description here

已编辑:我正在扩展 Account invoice report addons/account/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>

最佳答案

您可以使用以下方式完成:

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

<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>

这可能对你有帮助。

关于html - 账户发票报表税表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45041824/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com