I've added a new field to "hr.contract" which is a one2many to another model "X". Each record of "X" has a many2one field to another model "Y". So the design is like this: "hr.contract" -----one2many----> "X" -------many2one-----> "Y"
In "hr.contract" view, I have a one2many widget for "X". Each line of it contains a dropdown for "Y".
Now, here's what I'm after. In each line of "one2many" widget, I want the dropdown list (for many2one field) to contains only records of "Y" that has not been selected in the previous lines on widget. I tried couple of things with the X2Many widget but didn't have any luck. any suggestion?
Note that I'm using Odoo version 9.0.
Thanks :)