Hello Everyone.....
In Odoo 10, I have inherited product.template Class and in that I want to write value of custom field cost to field price that is in seller_ids One2many i.e. product.supplierinfo class.But I am not able to write value in One2many my code is below: -
class ProductTemplateInherit(models.Model):
_inherit = "product.template"
@api.multi
def update_value(self):
listPrice = self.cost
list=[]
for a in self.env['product.supplierinfo'].search([('product_tmpl_id','=',self.id)]):
list.append({'price':listPrice})
return {'value': {'seller_ids': list}}
Thanks in advance.