Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1937 Visualizações

I need to sum the total quantity of several products by id, I have achieved only that the total quantity of all products in general is added, but I need to sum product by product and then show the total quantity of product 1 and the total quantity of product 2 and so on

Avatar
Cancelar
Melhor resposta

Hi,

You can use read_group function to achieve this

Example

order_line.read_group([], ["quantity", "product_id"], ["product_id"])

Regards

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
mai. 23
1842
1
jun. 22
2400
1
jun. 22
1535
1
abr. 24
1298
1
out. 23
1439