Hi,
I am trying to load mail.message wizard using following code in python file:
return {
'name': 'Compose Message',
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
'domain': [('parent_id', '=',12)],
'views': [(compose_form_id, 'form')],
'view_id': compose_form_id,
'target': 'new',
'context': ctx,
}
Wizard is opening proper. I need domain filter on partner_ids field and above domain is not working for that. I tried following scenarios:
'domain': [('parent_id', '=', 12)]
'domain': [['parent_id', '=', 12]]
'domain': [('parent_id', '=', 12), ]
But nothing is working out. Can anyone please help me to find the issue. Do I need to specify field name as well where to put that domain. If yes, then how?
An idea: https://learnopenerp.blogspot.com/2021/03/domain-filter-one2many-child-fields-on-the-basis-of-parent-fields.html