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

Hello everybody!!!

My friends, i am printing some reports.

But, the problem is that i have some fields type float. So, when i print my reports i get comma.

I want to eliminate the comma without multiplying the number.

So, i there any way except multiplying the number or changing the field from integer to char.

Need an answer firends.

Thanks a lot in advance.

Best Regards.        

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

Here is the answer for you my friend;

      <span t-esc="'%.0f'%company.cnss"/>

Best regards.

아바타
취소
베스트 답변

use in case if you are trying in form or tree 

widget="payment"

example

in py

class sample(models.Model):   

         _name="module.sample"

         integer_field = fields.Integer()

in xml

<field name="integer_field" widget="payment"/>
아바타
취소
베스트 답변

For Odoo 12, here is the syntax.

<span t-field="employee_code" t-options='{"widget": "payment"}' />
아바타
취소
베스트 답변

In qweb report we use ,

<span t-field="doc.total_fine_amount"

              t-field-options='{"widget": "payment"/>

아바타
취소
관련 게시물 답글 화면 활동
0
5월 16
2823
1
8월 23
5218
4
11월 24
7240
0
12월 18
3580
9
2월 17
5825