[FIX] account: reintroduce tax lines in invoice
Commit d861cdc1c4 introduced the tax group feature. The tax line
details were removed from the printed invoice in favor of the tax group.
However, it requires that all tax groups are correctly defined in the
localization, otherwise the printed invoice doesn't show the required
tax details.
The correct fix, which is the complete definition of the tax groups,
will be done for the upcoming v11 version. In the meantime, this simply
introduces back the tax details table.
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
</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><span t-esc="amount_by_group[0] if len(o.tax_line_ids) > 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
|
||||
<td class="text-right">
|
||||
<span t-esc="amount_by_group[1]" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
||||
</td>
|
||||
@@ -117,7 +117,28 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" t-if="len(o.tax_line_ids) > 1">
|
||||
<div class="col-xs-6">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tax</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.tax_id.description"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="t.amount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p t-if="o.comment">
|
||||
<strong>Comment:</strong>
|
||||
<span t-field="o.comment"/>
|
||||
|
||||
Reference in New Issue
Block a user