I have two models A has a One2many relationship to B in which there is a selection
class A();
_name = 'class.a'
class_b_ids = One2many('class.b', class_a_id)
class B()
_name = 'class.b'
class_a_id = Many2one('class.a')
selection_type = selection(....)
Is it possible to use a domain on the xml that concerns the One2Many field with the selection?
like this
<field name="class_b_ids" domain="[('selection_type', '=', some_selection)]"/>
EDIT:
My error:
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1776, in <listcomp> return [(value, translate(label) if label else label) for value, label in selection] ValueError: too many values to unpack (expected 2)