تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
13981 أدوات العرض

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 ?

 

 

 

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

try :

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

Bye

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 25
6072
0
ديسمبر 24
1183
1
مايو 24
2668
2
يناير 24
1836
1
سبتمبر 23
1515