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

My company is providing the steel roof, that type of product not only has the quantity but also come with the size include length and amount of piece. normally, the sales order has many order lines for the same product. I would like to connect all the product that come with same product_id in to a row as picture below. Could you guy please help me redesign the quoation sale order qweb report and invoice qweb report. Thank for your attention.

http://i.imgur.com/87nHfRc.png

아바타
취소
베스트 답변

- You need to sort the sale order lines by product id, then count the line of each product id (by python code)

google "python sort list of tuples"

a = [(1, "ahbe"), (2,"sss"), (1, "ddjj")]
a.sort(key=lambda tup: tup[0])
a
>>>  [(1, 'ahbe'), (1, 'ddjj'), (2, 'sss')]

google "python count element in list of tuples"

from collections import Counter
Counter(tup[0] for tup in a)
>>> Counter({1: 2, 2: 1})

- then edit/create the xml file, the first time of each product id, add 1 cell with rowspan.

아바타
취소
작성자

Thank Giang, i get your idea, but because the lack of IT knowleadge, could you give me a favor, show me each specific steps to do, thank for your time.

please skype me @fanha99

베스트 답변

Hi you can use rowspan like:
<td  t-att-rowspan="3"><span t-esc="-----"></span></td>
OR for some field value use like:
<td  t-att-rowspan="field_value"><span t-esc="-----"></span></td>

Hope it will help.

아바타
취소
베스트 답변

Hi thanhthuansteel

For that you could use bootstrap layout css clasess for tables or divs



아바타
취소
작성자 베스트 답변

Thank you, so i do need to rebuild the report again totally?

아바타
취소