Skip to Content
Menu
This question has been flagged
2 Replies
2847 Rodiniai

Hi,

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

Portretas
Atmesti
Best Answer

hello

apply the domain on the M2O field

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

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


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
3
spal. 23
19464
5
spal. 20
4110
2
birž. 20
6706
5
bal. 25
16396
1
liep. 23
4430