Skip to Content
मेन्यू
This question has been flagged
2 Replies
2804 Views

Hi,

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

Avatar
Discard
Best Answer

hello

apply the domain on the M2O field

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

Avatar
Discard
Best Answer

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)]"


Avatar
Discard
Related Posts Replies Views Activity
3
अक्तू॰ 23
19360
5
अक्तू॰ 20
4063
2
जून 20
6659
5
अप्रैल 25
16326
1
जुल॰ 23
4398