Issue 10003

Title
Client crash with widget time in editable tree
Priority
bug
Status
resolved
Nosy list
ced, jan, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2021-01-16.09:20:05 by jan, last changed 1 month ago by roundup-bot.

Messages

New changeset 865887539ccd by Cédric Krier in branch '5.8':
Set text on child of editable for Time widget
https://hg.tryton.org/tryton/rev/865887539ccd

New changeset 9a12e0186453 by Cédric Krier in branch '5.6':
Set text on child of editable for Time widget
https://hg.tryton.org/tryton/rev/9a12e0186453

New changeset bb11b55ae2c1 by Cédric Krier in branch '5.0':
Set text on child of editable for Time widget
https://hg.tryton.org/tryton/rev/bb11b55ae2c1
New changeset 59d114f51f5f by Cédric Krier in branch 'default':
Set text on child of editable for Time widget
https://hg.tryton.org/tryton-env/rev/59d114f51f5f
New changeset 42d0c1e001a1 by Cédric Krier in branch 'default':
Set text on child of editable for Time widget
https://hg.tryton.org/tryton/rev/42d0c1e001a1
Author: [hidden] (jan)
Date: 2021-01-16.14:36:00

yes - it fixed the issue.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-01-16.10:11:41

It was introduced by issue9227.
Here is review320571002 which should fix it.

Author: [hidden] (jan)
Date: 2021-01-16.09:20:05
/home/jan/tryton54/tryton/gui/window/view_form/screen/screen.py:644: SyntaxWarning: "is" with a literal. Did you mean "=="?
  saved = all((x is 0 or x > 0 for x in self.group.save()))
/home/jan/tryton54/tryton/gui/window/view_form/screen/screen.py:649: SyntaxWarning: "is" with a literal. Did you mean "=="?
  saved = record_id is 0 or record_id > 0
/home/jan/tryton54/tryton/common/domain_parser.py:501: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if value or value is 0 or isinstance(value, float):
/home/jan/tryton54/tryton/common/domain_parser.py:507: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  and value is not 0
ERROR:tryton.common.common:  File "/home/jan/tryton54/tryton/gui/window/form.py", line 364, in sig_new
    self.screen.new()
  File "/home/jan/tryton54/tryton/gui/window/view_form/screen/screen.py", line 602, in new
    group.add(record, self.new_model_position())
  File "/home/jan/tryton54/tryton/gui/window/view_form/model/group.py", line 322, in add
    self.insert(position, record)
  File "/home/jan/tryton54/tryton/gui/window/view_form/model/group.py", line 104, in insert
    self.signal('group-list-changed', ('record-added', record, pos))
  File "/home/jan/tryton54/tryton/signal_event.py", line 15, in signal
    fnct(self, signal_data, *data)
  File "/home/jan/tryton54/tryton/gui/window/view_form/screen/screen.py", line 422, in _group_list_changed
    view.group_list_changed(group, signal)
  File "/home/jan/tryton54/tryton/gui/window/view_form/view/list.py", line 905, in group_list_changed
    self.display()
  File "/home/jan/tryton54/tryton/gui/window/view_form/view/list.py", line 1051, in display
    widget.set_editable()
  File "/home/jan/tryton54/tryton/gui/window/view_form/view/list_gtk/widget.py", line 302, in set_editable
    self.editable.set_text(self.get_textual_value(record))

AttributeError: 'Time' object has no attribute 'set_text'

I tried to find the bug - but hard to investigate, because editable sometimes is a bool - sometime the entry

debugging shows, that self.editable in widget line 302 are different objects:

<datetime_.Time object at 0x7f6274cbedc0 (Time at 0x562a5d0d6b50)>
History
Date User Action Args
2021-01-28 23:00:36roundup-botsetkeyword: - backport
messages: + msg64156
2021-01-24 21:02:14cedsetkeyword: + backport
2021-01-24 21:00:10roundup-botsetmessages: + msg64074
2021-01-24 21:00:07roundup-botsetmessages: + msg64073
nosy: + roundup-bot
status: testing -> resolved
2021-01-16 14:36:00jansetmessages: + msg63912
2021-01-16 10:24:06reviewbotsetmessages: + msg63906
nosy: + reviewbot
2021-01-16 10:11:41cedsetassignedto: ced
component: + tryton
keyword: + review
messages: + msg63905
nosy: + ced
reviews: 320571002
status: unread -> testing
2021-01-16 09:20:05jancreate

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