Skip to content

Commit

Permalink
[WIP] l10n_do: fix template render
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-pcg committed Mar 23, 2023
1 parent df88b1e commit b719cad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 44 deletions.
4 changes: 3 additions & 1 deletion addons/l10n_do/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def _get_l10n_do_amounts(self, company_currency=False):
amount_field = company_currency and "balance" or "price_subtotal"
sign = -1 if (company_currency and self.is_inbound()) else 1

itbis_tax_group = self.env.ref("l10n_do.group_itbis", False)
itbis_tax_group = self.env.ref(
"account.%s_group_itbis" % self.company_id.id, False
)

taxed_move_lines = self.line_ids.filtered("tax_line_id")
itbis_taxed_move_lines = taxed_move_lines.filtered(
Expand Down
43 changes: 0 additions & 43 deletions addons/l10n_do/views/report_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,6 @@
<t t-set="total_exempt_amount"
t-value="l10n_do_amounts['itbis_exempt_amount']"/>

<tr class="border-black o_total" t-if="ecf_representation">
<td>Monto Gravado</td>
<td class="text-right o_price_total">
<!-- MontoGravadoTotal consiste en la suma de la base imponible de todas las lineas gravadas con ITBIS -->
<span class="text-nowrap"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-out="total_amount_taxed"/>
</td>
</tr>
<tr t-if="ecf_representation">
<td>Monto Exento</td>
<td class="text-right o_price_total">
<!-- MontoExento consiste en la suma de la base imponible de todas las lineas exentas -->
<span class="text-nowrap"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-out="total_exempt_amount"/>
</td>
</tr>

<!-- Total = subtotal + impuestos + retenciones -->
<tr class="border-black o_total">
<td>
Expand Down Expand Up @@ -280,30 +261,6 @@
<br/>
</xpath>

<!-- Total monto descuento en líneas -->
<xpath expr="//th[@name='th_price_unit']" position="after">
<th t-if="is_l10n_do_invoice and display_discount and ecf_representation"
t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>Monto descuento</span>
</th>
</xpath>
<xpath expr="//td[@t-if='display_discount']" position="after">
<td t-if="is_l10n_do_invoice and display_discount and ecf_representation"
t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<t t-set="price_unit_wo_discount"
t-value="line.price_unit * (1 - (line.discount / 100.0))"/>
<t t-set="discount_amount"
t-value="abs(price_unit_wo_discount) if line.discount else 0"/>
<span class="text-nowrap" t-out="discount_amount"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</xpath>

<!--<xpath
expr="//div[@id='total']/div/table/t[@t-call='account.document_tax_totals']"
position="replace">
<t t-call="l10n_do.document_tax_totals"/>
</xpath>-->
<t t-call="account.document_tax_totals" position="attributes">
<attribute name="t-call">l10n_do.document_tax_totals</attribute>
</t>
Expand Down

0 comments on commit b719cad

Please sign in to comment.