_columns = {
'pro_ta':fields.many2one('product.terrif.no','Tariff No.'),
'die_id':fields.many2one('product.product','Product'),
'metal_id':fields.many2one('metal.metal','Metal' )
}
def on_chnage_product(self, cursor, user, field,die_id, context=None):
value = False
if not die_id:
return value
prod=die_id
qur = ("""select metal_metal_die_id from metal_metal_die_relation where die_id=%s"""%(prod) )
cursor.execute(qur)
r = cursor.fetchone()
value = r[0]
i am fetching data through the query and saving the value in variable (value). now i want to assign the value of this variable to the column metal_id of the same table.
how can i assign it???????