Skip to Content
Menu
This question has been flagged
2 Replies
1498 Views

Hello,

I have example domain:

[('one2manyfield', 'OPERATOR', [1,2])]

I want to write domain that results in records which have 'one2manyfield' with ids 1 AND 2. 

Which operator should I use to achieve that?

I can do it by

[('one2manyfield', 'in', [1]), ('one2manyfield', 'in', [2])]

but I want to achieve the same result with one operator

Avatar
Discard
Best Answer

Hi,

Please try this

[('one2manyfield.id', 'in', [1,2])]
Avatar
Discard
Best Answer

Hi,

Probably it should be in operator in your case, [('one2manyfield', 'in', [1, 2])]
[('one2manyfield', 'in', your_current_model_field.ids)]

Check this too,

https://stackoverflow.com/questions/29442993/which-are-the-available-domain-operators-in-openerp-odoo

https://www.odoogap.com/blog/odoogap-blog-1/odoo-domain-operators/

Hope it helps

Thanks

Avatar
Discard
Author

No, It not works as I asked in question. Thanks for try

Related Posts Replies Views Activity
2
Mar 24
571
0
Feb 24
1197
0
Jan 23
706
1
Nov 22
1761
0
Aug 22
1053