Skip to Content
Menu
This question has been flagged
1 Reply
1302 Views
class A(models.Model):
     area = fields.Float( compute = "_compute_area" , string = "Area" , track_visibility = 'onchange' , digits =( 12 , 7 ))
price_Pc = fields.Float( compute = "_compute_price_Pc " , string = "Price/Pc" , track_visibility = 'onchange' , digits =( 12 , 10 ))
     rate_SqM = fields.Float(     compute ="_compute_rate_SqM" , string = "Rate/SqM" , track_visibility = 'onchange' , digits =( 12 , 2 ))
     gsm = fields. Float( required = True , string = "GSM" , track_visibility = 'onchange' )
     rate_Kg = fields.Float( required = True , string = "Rate/Kg" , track_visibility = 'onchange' )
coverage = fields. Float( default = 100.0 , required = True , string = "Coverage" , track_visibility = 'onchange' )

    @api.depends('?????????')
    def _compute_area(self):
                pass
class B(models.Model):
       a = field.many2many(comodel_name="module.A")         deck = fields.float()



question is how can i access "deck" value inside model A's depends() ?
Avatar
Discard

please also state the relation between objects A and B.

Author Best Answer

A is many2many field in B


Avatar
Discard
Related Posts Replies Views Activity
0
Sep 22
961
1
Jul 22
1060
3
Apr 23
8362
0
Feb 23
157
0
Dec 22
1520