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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
1
Beantwoorden
1929
Weergaven
Hi,
You can use read_group function to achieve this
Example
order_line.read_group([], ["quantity", "product_id"], ["product_id"])
Regards
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
0
mei 23
|
1839 | ||
Get the values of one2many field
Opgelost
|
|
1
jun. 22
|
2393 | |
|
1
jun. 22
|
1524 | ||
|
1
apr. 24
|
1292 | ||
|
1
okt. 23
|
1433 |