Skip to Content
मेन्यू
This question has been flagged
3 Replies
42846 Views

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 .

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

you can try it

python

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

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

Avatar
Discard
Author Best Answer

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.

Avatar
Discard
Related Posts Replies Views Activity
1
अग॰ 17
5658
1
दिस॰ 16
5929
3
मई 25
1592
1
अप्रैल 25
1208
3
सित॰ 24
14046