Tryton - Issues



Title Error when using create_date field in a list view or a form view
Priority bug Status invalid
Superseder Add TimeStamp field
View: 6463
Nosy List Timitos, ced
Type crash Components
Assigned To Keywords

Created on 2015-11-12.14:55:26 by Timitos, last changed by Timitos.

msg23114 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-11-12.16:22:10
create_date is a timestamp field and there is not widget for it so it can not be displayed.
msg23113 (view) Author: [hidden] (Timitos) (Tryton translator) Date: 2015-11-12.14:58:18
Same problems with form view. But it crashes with the date widget too.
msg23112 (view) Author: [hidden] (Timitos) (Tryton translator) Date: 2015-11-12.14:55:25
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/", 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/", line 338, in default_row_activate
    }, context=self.context.copy(), warning=False)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/action/", line 174, in exec_keyword
    Action._exec_action(action, data, context=context)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/action/", line 137, in _exec_action

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/", line 33, in create
    limit=limit, search_value=search_value, tab_domain=tab_domain)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/", line 113, in __init__
    search_value=search_value, tab_domain=tab_domain)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/", line 96, in __init__

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/", line 365, in switch_view

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/", 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/", line 399, in add_view_id
    return self.add_view(view)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/screen/", 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/", line 47, in parse
    return ViewTree(screen, root, children_field)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/", line 285, in __init__

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/", line 323, in parse

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/", line 352, in _parse_field
    Widget = self.get_widget(node_attrs['widget'])

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/", line 453, in get_widget
    return cls.WIDGETS[name]


I tried to use the datetime widget:
<field name="create_date" widget="datetime"/>

Then i get this error:
  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list_gtk/", line 53, in wrapper
    return func(self, *args, **kwargs)

  File "/home/kpreisler/dev/tryton/tryton34/tryton/gui/window/view_form/view/list_gtk/", 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:
<field name="create_date" widget="date"/>

Is this an expected behavior, a missing feature or a bug?
Date User Action Args
2017-04-26 07:35:30Timitossetsuperseder: + Add TimeStamp field
2015-11-12 16:22:11cedsetstatus: chatting -> invalid
nosy: + ced
messages: + msg23114
2015-11-12 14:58:18Timitossetstatus: unread -> chatting
messages: + msg23113
title: Error when using create_date field in a list view -> Error when using create_date field in a list view or a form view
2015-11-12 14:55:27Timitoscreate

Showing 10 items. Show all history (warning: this could be VERY long)