Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
2809 Vizualizări

Hi,

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

Imagine profil
Abandonează
Cel mai bun răspuns

hello

apply the domain on the M2O field

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

Imagine profil
Abandonează
Cel mai bun răspuns

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
oct. 23
19371
5
oct. 20
4073
2
iun. 20
6667
5
apr. 25
16333
1
iul. 23
4402