New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] fields: remove support for non-string selections #29039
Conversation
de6cd09
to
ef06399
Compare
ef06399
to
76530b2
Compare
76530b2
to
8ad5887
Compare
Do web client handle correctly the 0/1 selection fields with the boolean widget? |
@KangOl thanks for pointing that out, I haven't checked it. |
@KangOl I don't understand. IMHO, there is not point using the boolean widget with a selection field. The boolean widgets are aimed a boolean fields only. We have used selection fields in place of boolean fields in the configuration wizard. The point was to use the radio button widget. This one works as expected. |
@gurneyalex you had several reasons for using selection with integers instead of strings, do you? |
@pedrobaeza yes, interfacing with external systems which use enums. There are lots of these in the wild. The support was badly broken with "0" being not usable (displayed as unset, in Odoo), we ended up using stringified integers and adding int(val) and str(val) all over the place to parse / generate the expected values. See for instance #11015 |
@pedrobaeza @gurneyalex the purpose of this task is definitively to simplify things, and remove a feature that is both fragile and error-prone. See #28877 and #28891 for fixing such a terrible programming error. |
@KangOl are you okay with merging this? |
Yes. |
@robodoo r+ |
Merged, thanks! |
Task https://www.odoo.com/web#id=1911598&model=project.task&menu_id=4720