i have this function
a = fields.Float('a',digits=(9,3))
b= fields.Float('b',digits=(9,3))
wage_after_ded = fields.Float('x')
@api.onchange('a','b')
def onchange_field130(self):
if self.a or self.b:
self.wage_after_ded = self.a- self.b
it must be : 2650 - 389.012 = 2260.988
but my function output is 2265.75
did you try: fields.Float('x') -> fields.Float('x', digits=(9,3)) ?