good afternoon,
I have created a float field that will be used for tax calculations, but I have problems with rounding. what is the type of field you should select for these calculations, float or Monetary. so as not to have these errors.
For example:
def round_decimal (x):
return x.quantize (Decimal (". 01"), rounding = ROUND_HALF_UP)
newvalue = fields.Float (string = "Others", default = 0.0)
newvalue = (price * self.quantity) * (self.invoice_line_tax_ids [0] .amount / 100)
newvalue = 7.1450
print (round_decimal (Decimal (newvalue)))
## b = 7.14
** expected 7.15
or how should I round it?
or rounding odoo taxes to two decimal places?
Thanks a lot,