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

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

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

You can use read_group function to achieve this

Example

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

Regards

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
mai 23
1839
1
iun. 22
2396
1
iun. 22
1526
1
apr. 24
1293
1
oct. 23
1434