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

Hello Friends,

Can anyone know how to cut down 2 digits after decimal,there actually in default displayed 4 digits in Qweb report.

For example:

if value is 123.4556 it will be cut down as 123.46

if value is 1456.0000 then it should displayed as 1456.00

Please help me to resolve this situation.Thanks in advance

아바타
취소

Thanks so much for help.

베스트 답변

Hello,

I Think it's helpful for you. 

<span t-esc="'%.2f'% l.product_uom_qty"/>

Thanks.

아바타
취소
베스트 답변

Hello 

You can take reference of below code

<span t-esc="sum(docs.mapped('amount'))" t-options='{"widget": "float", "precision": 2}'/>
Best Thanks,
Ankit H Gandhi.
아바타
취소
베스트 답변

Hello, you can use formatLang like that:


<div class="number-report">

<span t-esc="formatLang(line.price_subtotal, digits=2)"/>

</div>

아바타
취소
관련 게시물 답글 화면 활동
4
5월 23
10709
1
1월 19
9697
0
10월 17
3549
0
11월 16
2825
0
10월 16
5051