ayar
ayar

Reputation: 143

Select only Time in Datetime Widget Odoo10

I'm trying to show the widget time in the Datetime field, and that this value is stored in the variable hor_ini is currently declared as follows:

hor_ini = fields.Datetime (required = True)

but I do not achieve that when I select the view fields show me for default only the time widget

enter image description here

Any suggestions, is welcome

Upvotes: 0

Views: 2273

Answers (2)

Navi
Navi

Reputation: 1052

Change your date field to float in python.

In xml, add widget="float_time"

Upvotes: 2

Quentin THEURET
Quentin THEURET

Reputation: 1232

Did you try widget='time' in the XML View definition ?

Upvotes: 0

Related Questions