Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
2836 Visualizações

Hi,

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

Avatar
Cancelar
Melhor resposta

hello

apply the domain on the M2O field

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

Avatar
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
3
out. 23
19459
5
out. 20
4103
2
jun. 20
6703
5
abr. 25
16384
1
jul. 23
4426