Issue 10485

Title
Character entries of Dict widget are considered modified when their value is None
Priority
bug
Status
in-progress
Nosy list
ced, nicoe, reviewbot
Assigned to
nicoe
Keywords
review

Created on 2021-06-03.19:34:12 by nicoe, last changed 7 days ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-06-09.08:43:10

I do not agree with the observation. A dict key with a value equals to None is removed from the dict.
So the client should not behave like if it was an empty string. At best the clients could ignore such key when displaying the Dict but the problem is mainly in the code that set a key value to None.

Author: [hidden] (nicoe) Tryton committer
Date: 2021-06-03.19:34:12

Contrary to usual Character widgets the widgets used in the Dictionary are considered modified if their value is None.

In fact what happens is that there is no validation of the value of the dict, so if some code set a char value to None. The widget will be considered modified while it wasn't in any way. This does not happen for usual fields.Char because tryton will convert None to "" during the read.

We should probably unify the behaviour which is the goal of the attached review.

History
Date User Action Args
2021-06-09 08:43:10cedsetmessages: + msg68155
nosy: + ced
2021-06-03 19:54:34reviewbotsetmessages: + msg67945
nosy: + reviewbot
2021-06-03 19:34:12nicoecreate

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