İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1933 Görünümler

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
Vazgeç
En İyi Yanıt

Hi,

You can use read_group function to achieve this

Example

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

Regards

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
May 23
1841
1
Haz 22
2400
1
Haz 22
1532
1
Nis 24
1298
1
Eki 23
1439