Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
1960 Visninger

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
Kassér
Bedste svar

Hi,

You can use read_group function to achieve this

Example

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

Regards

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
maj 23
1857
1
jun. 22
2451
1
jun. 22
1559
1
apr. 24
1315
1
okt. 23
1460