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

Hi community,

Am facing this issue.

i have this field in my model : start_date: field.Float()

For instance, if 10:20 is inputed in form view it's okay but when printed in pdf i got 10.5

What could be the issue?

아바타
취소

check the widget float_time

베스트 답변

I faced something similar in my Odoo 13. Solution:

In the model:

start_date = fields.Float ('Date')

In QWeb report:

<span t-esc = "doc.start_date" t-options= '{"widget": "float_time"}'/>

Hope this helps someone. Cheers!

아바타
취소
베스트 답변

long story short: <span t-field="start_date" t-field-options='{"format": "%H:%M"} />

아바타
취소
베스트 답변

Use odoo date field

start_date = fields.Date('Date')

Instead of float

start_date: field.Float()

And in qweb reports use

<span t-field="doc.start_date"/>

For more information visit

1- http://learnopenerp.blogspot.com/2016/11/how-to-create-qweb-reports-in-openerp.html

2- http://learnopenerp.blogspot.com/2016/09/how-to-create-custom-reports-in-odoo.html

아바타
취소
관련 게시물 답글 화면 활동
2
10월 23
6525
2
11월 22
6922
0
9월 21
3025
2
3월 20
11748
2
12월 19
2729