Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
42855 Vizualizări

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 .

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Cel mai bun răspuns

you can try it

python

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

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 17
5665
1
dec. 16
5946
3
mai 25
1620
1
apr. 25
1225
3
sept. 24
14082