I want to make the field in the same model product.product
let's say A which is depends on lst_price of product.product
.
if user not set value of A then its take lst_price but if User will set the value of A then its set as it is. Also A field value change on variant price set.
amount=fields.Float(compute="_compute_amount",inverse="_set_amount",store=True)
@api.depends('lst_price')
def _compute_amount(self):
for product in self:
if product.amount<product.lst_price:
product.amount = product.lst_price
@api.one
def _set_amount(self):
return True