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:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
1919
瀏覽次數
Hi,
You can use read_group function to achieve this
Example
order_line.read_group([], ["quantity", "product_id"], ["product_id"])
Regards
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
0
5月 23
|
1837 | ||
|
1
6月 22
|
2389 | ||
|
1
6月 22
|
1522 | ||
|
1
4月 24
|
1288 | ||
|
1
10月 23
|
1421 |