Odoo Help

Welcome!

This community 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.

1

Many2many domain filter not working

By
SHIV SHANKAR
on 8/18/16, 1:11 AM 181 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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