I want to filter for parent_id only categories that are in the same configurator. I've tried filter
domain="[('configurator_id', '=', id)]" for the ID takes the categories ID. If I give for the right argument "configurator_id" or "configurator_id.id" it just raises error.
How can I create this filter?
<record id="tabla_configurator_form_view" model="ir.ui.view"> <field name="name">Tabla Configurator Form View</field> <field name="model">tabla.configurator</field> <field name="arch" type="xml"> <form> <sheet> <group string="Configurator" colspan="4"> <field name="id" readonly="1"/> <field name="name" required="1"/> <field name="active"/> </group> <group string="Categories" colspan="4"> <field name="category_ids" nolabel="1"> <tree editable="bottom"> <field name="name"/> <field name="configurator_id" invisible="1"/> <field name="parent_id" domain="[('configurator_id', '=', parent.id)]"/> </tree> </field> </group> </sheet> </form> </field> </record>
get an idea: https://learnopenerp.blogspot.com/2020/09/domain-filter-many2one-field-odoo13.html
As usual your blog is no help at all! The method that creates the domain filter gets only executed when I'm on the views of the model and even then it doesn't work! I need a filter that works when you're on the parent model view!