Edi Santoso
Odoo and Python Developer
drink a tea to enjoying the life

odoo domain filter in many2many (ids)

domain filter


Try this:
<field
    name="organization_type_id"
    domain="[('id', 'in', parent_id.organization_type_id.allowed_children_ids.ids)]"
    />
While allowed_children_ids is a set of records, allowed_children_ids.ids is a list of ids of those records.
You can also approach this from the other side. This should work and be event faster:
<field
    name="organization_type_id"
    domain="[('allowed_parent_type_ids', '=', parent_id.organization_type_id)]"
    />


source : http://stackoverflow.com/questions/32135065/odoo-8-many2many-domain-filter