Skip to Content
Menu
This question has been flagged
2 Replies
3585 Views

I am trying to change the decimal precision of the discount field in the so portal view. 

Im trying to change the widget..but that doesn't work.


Avatar
Discard
Author Best Answer

Usually widget should work but since it is t-esc so you adding widget will not work
you will need to use float formatting ,it should be:


Avatar
Discard

Hello and my apologies for my english

I am trying to reduce the decimals in the tax field in the invoice report "report_invoice_document"

The code that publishes the calculation of the tax is
<t t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) in [0, 1] and float_compare(o.amount_untaxed, amount_by_group[2], precision_rounding=o.currency_id.rounding) == 0">
<td><strong>IVA (16%)</strong></td>
<td class="text-right o_price_total">
<span class="text-nowrap" t-esc="amount_by_group[3]"/>
</td>
</t>

I have managed to reduce the other fields (total, subtotal) with the following code
t-options="{'widget':'float', 'precision':2}"

I appreciate any support and help on this

Best Answer

Hola  Ruben GOnzalez lograste llegar a una solucion? 

me acabo de topar con el mismo problema seria de mucha ayuda tu respuesta. gracias de antemano

Avatar
Discard