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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
1928
Widoki
Hi,
You can use read_group function to achieve this
Example
order_line.read_group([], ["quantity", "product_id"], ["product_id"])
Regards
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
maj 23
|
1838 | ||
Get the values of one2many field
Rozwiązane
|
|
1
cze 22
|
2392 | |
|
1
cze 22
|
1523 | ||
|
1
kwi 24
|
1290 | ||
|
1
paź 23
|
1431 |