Hi
I'm trying to create new product in product.template model using the following code
def write(self, values):
# list_price = self.env['product.template'].create(values)
list_price = self.env['product.template'].create({'list_price': self.unit_cost, 'name': self.p_name})
print(values)
self.env['product.template'].clear_caches()
return super(Offset, self).write(values)
this creates a new record but the values 'name:p_name' stores as product.product(id#) and list_price stores a previously/earlier stored value
Thank you for helping me out