i have categorized products as meals and ingredients using 2 boolean fields(is_meal and is_ingredient). In my product.template, there is a child model for entering ingredients of the meals. when product entered in the child model, i want to pass this product to ingredients product
@api.model
defcreate(self,vals):
ifvals['ingredients_id']:
self.ingredients_id.is_ingredient =True
returnsuper().create(vals)