Hi everyone,
I’m trying to create a domain to restrict the parties to those with the category “CLIENTS”.
I wanted to use child_of, but I can’t find a way to retrieve dynamically the id :
domain=['OR',
('categories.name', '=', 'CLIENTS'),
('categories', 'child_of', ID, 'parent'),
]
It works if I set the value of ID in the source code but I want to retrieve it dynamically.
ID is like :
[('name', '=', 'CLIENTS', 'party.category')]
Is there a way to do something like :
domain=['OR',
('categories.name', '=', 'CLIENTS'),
('categories', 'child_of', [('name', '=', 'CLIENTS', 'party.category')][0].id, 'parent'),
]
Thanks