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

Hello, I'm using Odoo11, and need to format a qweb variable in a qweb report (report_saleorder_document).

The variable is a float number and should have the correct Thousands- and Decimal-Separator for the users language.


Example:

<t t-set="my_count" t-value="20000.1938"/>

<span t-esc="my_count"/>


In the report this shows: 20000.1938

but in the users language it should be: 20.000,1938


The Separators are correct set in odoo and work for other variables like product price.

아바타
취소

Did you check a default report or view for reference how it is done?

베스트 답변

You should try following,

<span t-esc="my_count" t-options='{"widget": "float", "precision": 2}'/>
아바타
취소

any other way ?

+1 for your answers. Thanks a lot it help me in display values like 111,22.00.

+1 from me.

It's working well.

작성자 베스트 답변

 Thanks for your answer. Is there a way to use the widget without a precision? I need to give out numbers with different precision?

아바타
취소
관련 게시물 답글 화면 활동
0
8월 16
5830
1
8월 15
12251
2
2월 25
58551
1
2월 24
6074
1
11월 21
4283