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.

0

Domain Filtering help opposite of child_of opperator

By
Erhuvwu Akpobaro
on 3/11/15, 11:33 AM 1,332 views

Hello guys , 

I need help with filtering , i am using domain filtering to filter products , the child_of operator allows me to select the products that are a child node of my selection criteria for example child of categ_id  94.

'product_id': fields.many2one('product.product','Product', domain="[('categ_id', 'child_of', 94)]", required=True)

is there a domain operator that shows all products that are not in the child_of a certain node. basically a opposite of child_of ?

 

 

 

0

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/11/15, 7:10 PM

Hi,

try :

domain="['!',('categ_id','child_of',[10, 20, 25])]"

Bye

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: 3/11/15, 11:33 AM
Seen: 1332 times
Last updated: 3/16/15, 8:10 AM