I have a model with one2many
field mes_indicator_sub_group_ids
.I tried this but nothing is filtered even that I know there is a record with id 5:
http.request.env['table.test'].sudo().search([('id', '=', int(category))]).filtered(lambda x: x.mes_indicator_sub_group_ids.ids in [5])
what I need is to filter record of table.test
that have only one record in mes_indicator_sub_group_ids
and its ID == 5.
EDITS
I have a model model.mes_indicator_group
, which contains two one2many fields, mes_indicator_sub_group_ids
and mes_indicator_ids
. I want to get recordset which relates to model.mes_indicator_group
with id=1 and mes_indicator_sub_group_ids
with id=5. For example I want to get mes_indicator_ids from first
group and fifth
subgroup. Just get data, not unlink or write. Sorry for bad english.