コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
42866 ビュー

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
5675
1
12月 16
5951
3
5月 25
1627
1
4月 25
1231
3
9月 24
14098