I am trying to create a domain filter that filters the selectable attributes based on the value of a many2many tag field outside of the many2one_list widget. I want the options the user can select in the attribute_id field to be limited based on the attributes in the attribute_value_ids field. But I get an error "Uncaught Error: NameError: name 'attribute_value_ids' is not defined" when trying to select a value in the attribute_id field inside the many2one_list widget.
Part of Current view code:
<sheet>
<group>
<field name="active" />
<field name="name" />
<field name="description" string="Description" widget="html" class="oe_edit_only" />
<field name="attribute_value_ids" string="Attributes" widget="many2many_tags" options="{'no_create': True}" />
</group>
<notebook>
<page string="Inventory Mapping">
<field name="webattribute_line_ids" widget="many2one_list" context="{'show_attribute': False}" nolabel="notrue">
<tree string="Variants" editable="bottom">
<field name="attribute_id" options="{'no_create': True}" domain="[('attribute_id','in',attribute_value_ids.attribute_id)]" />
<field name="value_ids" options="{'no_create': True}" domain="[('attribute_id', '=', attribute_id)]" context="{'default_attribute_id': attribute_id}" />
</tree>
</field>
</page>
</notebook>
</sheet>