Skip to content

Commit b719cad

Browse files
committed
[WIP] l10n_do: fix template render
1 parent df88b1e commit b719cad

File tree

2 files changed

+3
-44
lines changed

2 files changed

+3
-44
lines changed

addons/l10n_do/models/account_move.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ def _get_l10n_do_amounts(self, company_currency=False):
166166
amount_field = company_currency and "balance" or "price_subtotal"
167167
sign = -1 if (company_currency and self.is_inbound()) else 1
168168

169-
itbis_tax_group = self.env.ref("l10n_do.group_itbis", False)
169+
itbis_tax_group = self.env.ref(
170+
"account.%s_group_itbis" % self.company_id.id, False
171+
)
170172

171173
taxed_move_lines = self.line_ids.filtered("tax_line_id")
172174
itbis_taxed_move_lines = taxed_move_lines.filtered(

addons/l10n_do/views/report_invoice.xml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -181,25 +181,6 @@
181181
<t t-set="total_exempt_amount"
182182
t-value="l10n_do_amounts['itbis_exempt_amount']"/>
183183

184-
<tr class="border-black o_total" t-if="ecf_representation">
185-
<td>Monto Gravado</td>
186-
<td class="text-right o_price_total">
187-
<!-- MontoGravadoTotal consiste en la suma de la base imponible de todas las lineas gravadas con ITBIS -->
188-
<span class="text-nowrap"
189-
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
190-
t-out="total_amount_taxed"/>
191-
</td>
192-
</tr>
193-
<tr t-if="ecf_representation">
194-
<td>Monto Exento</td>
195-
<td class="text-right o_price_total">
196-
<!-- MontoExento consiste en la suma de la base imponible de todas las lineas exentas -->
197-
<span class="text-nowrap"
198-
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
199-
t-out="total_exempt_amount"/>
200-
</td>
201-
</tr>
202-
203184
<!-- Total = subtotal + impuestos + retenciones -->
204185
<tr class="border-black o_total">
205186
<td>
@@ -280,30 +261,6 @@
280261
<br/>
281262
</xpath>
282263

283-
<!-- Total monto descuento en líneas -->
284-
<xpath expr="//th[@name='th_price_unit']" position="after">
285-
<th t-if="is_l10n_do_invoice and display_discount and ecf_representation"
286-
t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
287-
<span>Monto descuento</span>
288-
</th>
289-
</xpath>
290-
<xpath expr="//td[@t-if='display_discount']" position="after">
291-
<td t-if="is_l10n_do_invoice and display_discount and ecf_representation"
292-
t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
293-
<t t-set="price_unit_wo_discount"
294-
t-value="line.price_unit * (1 - (line.discount / 100.0))"/>
295-
<t t-set="discount_amount"
296-
t-value="abs(price_unit_wo_discount) if line.discount else 0"/>
297-
<span class="text-nowrap" t-out="discount_amount"
298-
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
299-
</td>
300-
</xpath>
301-
302-
<!--<xpath
303-
expr="//div[@id='total']/div/table/t[@t-call='account.document_tax_totals']"
304-
position="replace">
305-
<t t-call="l10n_do.document_tax_totals"/>
306-
</xpath>-->
307264
<t t-call="account.document_tax_totals" position="attributes">
308265
<attribute name="t-call">l10n_do.document_tax_totals</attribute>
309266
</t>

0 commit comments

Comments
 (0)