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
ตอบกลับ
1978
มุมมอง
Hi,
You can use read_group function to achieve this
Example
order_line.read_group([], ["quantity", "product_id"], ["product_id"])
Regards
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
พ.ค. 23
|
1890 | ||
Get the values of one2many field
แก้ไขแล้ว
|
|
1
มิ.ย. 22
|
2459 | |
|
1
มิ.ย. 22
|
1574 | ||
|
1
เม.ย. 24
|
1333 | ||
|
1
ต.ค. 23
|
1467 |