Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
2798 Prikazi

Hi,

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

Avatar
Opusti
Best Answer

hello

apply the domain on the M2O field

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

Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
3
okt. 23
19339
5
okt. 20
4053
2
jun. 20
6654
5
apr. 25
16310
1
jul. 23
4393