Odoo Help

1

Many2many domain filter not working

By
SHIV SHANKAR
on 8/18/16, 1:11 AM 394 views

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?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/18/16, 1:11 AM
Seen: 394 times
Last updated: 8/19/16, 1:29 PM