Tryton - Issues



Title Date field becomes empty when focus is changed
Priority bug Status chatting
Superseder Nosy List ced, prakharb
Type crash Components tryton
Assigned To Keywords

Created on 2019-02-07.11:37:19 by prakharb, last changed by prakharb.

msg46835 (view) Author: [hidden] (prakharb) Date: 2019-02-07.12:02:41
I had to put line ( out of try-except block to get the traceback

ERROR:tryton.common.common:  File "/home/prakhar/workspace/tryton/tryton50/src/tryton/tryton/common/", line 159, in focus_out
  File "/home/prakhar/workspace/tryton/tryton50/src/tryton/tryton/common/", line 94, in parse
    date = date_parse(text, self.__format).date()
  File "/home/prakhar/workspace/tryton/tryton50/src/tryton/tryton/common/", line 23, in date_parse
    monthfirst = formatted_date.index('7') <= 1

substring not found

To add further to it, the locale here is en_IN. See the following output from python prompt.

>>> locale.getlocale()
('en_IN', 'ISO8859-1')
'Thursday 07 February 2019'
msg46834 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-07.11:42:05
Could you provide the traceback.
msg46833 (view) Author: [hidden] (prakharb) Date: 2019-02-07.11:37:18
The issue comes up in Tryton 5.0 client when the date field gets out of focus. It is due to an issue in the parser. The date field takes the string in the format - "Thursday 28 February 2019", whereas the code in the Tryton client checks for month as '7' (ref -
Date User Action Args
2019-02-07 12:02:41prakharbsetmessages: + msg46835
2019-02-07 11:42:05cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg46834
2019-02-07 11:37:19prakharbcreate

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