Error when using create_date field in a list view or a form view
We have a module that uses the create_date field in a list view and a form view. When migrating this module to 3.4 i get the following error when i try to open the list view with this field:
ERROR:tryton.common.common: File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list.py", line 1003, in __sig_switch
if not self.screen.row_activate() and self.children_field:
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 338, in default_row_activate
}, context=self.context.copy(), warning=False)
File "/home/kpreisler/dev/tryton/tryton34/tryton/action/main.py", line 174, in exec_keyword
Action._exec_action(action, data, context=context)
File "/home/kpreisler/dev/tryton/tryton34/tryton/action/main.py", line 137, in _exec_action
tab_domain=tab_domain)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/window.py", line 33, in create
limit=limit, search_value=search_value, tab_domain=tab_domain)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/form.py", line 113, in __init__
search_value=search_value, tab_domain=tab_domain)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 96, in __init__
self.switch_view()
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 365, in switch_view
self.load_view_to_load()
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 386, in load_view_to_load
self.add_view_id(view_id, view_type)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 399, in add_view_id
return self.add_view(view)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/screen.py", line 424, in add_view
view = View.parse(self, xml_dom, view.get('field_childs'))
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/__init__.py", line 47, in parse
return ViewTree(screen, root, children_field)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list.py", line 285, in __init__
self.parse(xml)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list.py", line 323, in parse
self._parse_field(node)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list.py", line 352, in _parse_field
Widget = self.get_widget(node_attrs['widget'])
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list.py", line 453, in get_widget
return cls.WIDGETS[name]
u'timestamp'
I tried to use the datetime widget:
Then i get this error:
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list_gtk/widget.py", line 53, in wrapper
return func(self, *args, **kwargs)
File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list_gtk/widget.py", line 357, in setter
time_format = field.time_format(record)
When i use the date widget, there is no error, but the field just shows the timestamp without any formatting:
Is this an expected behavior, a missing feature or a bug?