Tryton - Issues

 

Issue7744

Title Enforce required values on Many2One with selection widget
Priority feature Status testing
Superseder Nosy List ced, pokoli, reviewbot
Type feature request Components sao, tryton
Assigned To pokoli Keywords review
Reviews 60391002
View: 60391002

Created on 2018-09-27.17:13:49 by pokoli, last changed by ced.

Messages
msg44291 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-10-03.09:54:05
On 2018-10-03 09:33, Sergi Almacellas Abellana wrote:
> > One more case is that if the user wrongly select a value, he can not undo and revert to no selection.
> 
> I think we can not fix wrongly selected values, that's the user responsibility. 

You have to provide a way to undo mistakes.

> Which is the benefit of allowing to revert to no selection if the user has to come back later to set the field (as it is required)?

To not let a wrong value in the form otherwise the user may save it
later because he forgot.
msg44290 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-10-03.09:33:44
> One more case is that if the user wrongly select a value, he can not undo and revert to no selection.

I think we can not fix wrongly selected values, that's the user responsibility. 
Which is the benefit of allowing to revert to no selection if the user has to come back later to set the field (as it is required)?
msg44187 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-27.18:32:58
Well we do not agree. For me, the selection should behaves differently than other fields.
One more case is that if the user wrongly select a value, he can not undo and revert to no selection.
msg44182 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-09-27.17:58:40
> I do not agree. If there are no null value in the selection, the toolkit will select one by default which is not a good behavior as the user did not explicitly choose. Also in analogy, a Char field can always be erased even if it is required.

With the latest tryton trunk it does not select any option when the selection field is required and it does not have any default value (maybe is something that changed in gtk3)

On sao it works as you said: an empty option is show when there is no default value. But it can be improved as shown in:

https://stackoverflow.com/questions/8605516/default-select-option-as-blank

I think not showing the empty option when the field is required is a good improvement for the User Experience
msg44181 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-27.17:35:27
I do not agree. If there are no null value in the selection, the toolkit will select one by default which is not a good behavior as the user did not explicitly choose. Also in analogy, a Char field can always be erased even if it is required.
review60391002 updated at https://codereview.tryton.org/60391002/#ps1
msg44178 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-09-27.17:13:49
When showing a Many2One field with required values with a Selection widget the clients show an empty option but this option is not valid as the widget is required. 

So I think it's better to hide the empty option when the field is required.
History
Date User Action Args
2018-10-03 09:54:05cedsetmessages: + msg44291
2018-10-03 09:33:45pokolisetmessages: + msg44290
2018-09-27 18:32:59cedsetmessages: + msg44187
2018-09-27 17:58:40pokolisetmessages: + msg44182
2018-09-27 17:35:28cedsetnosy: + ced
messages: + msg44181
2018-09-27 17:26:51reviewbotsetnosy: + reviewbot
messages: + msg44180
2018-09-27 17:17:17pokolisetstatus: in-progress -> testing
reviews: 60391002
keyword: + review
2018-09-27 17:13:49pokolicreate

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