콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2032 화면

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

아바타
취소
베스트 답변

Hi,

You can use read_group function to achieve this

Example

order_line.read_group([], ["quantity", "product_id"], ["product_id"])

Regards

아바타
취소
관련 게시물 답글 화면 활동
0
5월 23
1910
1
6월 22
2574
1
6월 22
1685
1
4월 24
1380
1
10월 23
1564