Hi how can i use onchange to change the domain of an already existing field. For example, if i want to make it so that when i select a vendor to create a purchase order the list of products i can choose is restricted to those that share a value with the vendor
@api.onchange('partner_id')
def onchange_product_list(self):
return {'domain': {'product_id': [('partner_id.supplier_code', '=', 'self.sup_product_code')]}}
This is what i have so far
Using Odoo v11
I'm facing the same issue but I couldn't understand the solution
How do you solve it?