Hello All,
I have added a field in my form with name "product" and type Many2one from product.product. And also a field "new_price" field for price of a product. I want that when i select a particular product then its price should be automatically selected.
For this purpose i am writing an onchange:
@api.multi
# @api.onchange('product_id')
def onchange_secondary_price(self):
if self:
for rec in self:
rec.new_price = rec.product_id.price
but it is not working.
Help please