Skip to Content
Menu
This question has been flagged

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


Avatar
Discard

did you try: fields.Float('x') -> fields.Float('x', digits=(9,3)) ?

Related Posts Replies Views Activity
1
Mar 15
3168
0
Nov 19
3243
0
Aug 17
3209
3
Nov 19
5566
0
Apr 18
5173