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

Hi

    any one knows how to get only time in a field like fields.Time() to store only time that i select

i want a field which can store only time .

아바타
취소
베스트 답변

Hi,

You can add Time fields through this way

Python:

time = fields.Float(string='Time', compute="_compute_time")

Xml:

<field name="time" widget="float_time"/>

You can calculate the time using the compute function.

Thank you.

아바타
취소
베스트 답변

you can try it

python

time = fields.float('Duration in hours ')

 view
<
field name='time' widget='float_time' />

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

thank you but

<field name="time" widget="float_time"/>

i try it before ,it shows value in formate like (11:56) and want to store value in like (11:52:12) format, and value is selected  by user like happening  in datetime field.

아바타
취소
관련 게시물 답글 화면 활동
1
8월 17
5978
1
12월 16
6158
3
5월 25
2224
1
4월 25
1690
3
9월 24
14822