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
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
1
Respondre
1924
Vistes
Hi,
You can use read_group function to achieve this
Example
order_line.read_group([], ["quantity", "product_id"], ["product_id"])
Regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
0
de maig 23
|
1838 | ||
|
1
de juny 22
|
2390 | ||
|
1
de juny 22
|
1522 | ||
|
1
d’abr. 24
|
1288 | ||
|
1
d’oct. 23
|
1425 |