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

Hi,

I need to know how to get only stockable products for a Many2one field.

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

hello

apply the domain on the M2O field

<field name="your_fieldname" domain="[('type', '=', 'product')]"/>

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

Hello Dishan,

pass domain for many2one field.

domain = "[('type','=','product')]"  if you pass this domain on your xml it will filter only stockable products.

if you want only on hand qty available products then add this domain , domain = "[('qty_available','&gt;',0)]"


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
أكتوبر 23
19468
5
أكتوبر 20
4111
2
يونيو 20
6712
5
أبريل 25
16403
1
يوليو 23
4435