Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

xmo-odoo
Copy link
Collaborator

@xmo-odoo xmo-odoo commented Nov 26, 2018

@C3POdoo C3POdoo added the RD research & development, internal work label Nov 26, 2018
@rco-odoo rco-odoo force-pushed the master-deselect branch 5 times, most recently from de6cd09 to ef06399 Compare January 25, 2019 13:26
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 25, 2019
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 25, 2019
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jan 26, 2019
@rco-odoo rco-odoo changed the title [WIP] remove support for non-string selections [IMP] fields: remove support for non-string selections Jan 26, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 26, 2019
@rco-odoo rco-odoo requested a review from KangOl January 28, 2019 09:22
@KangOl
Copy link
Contributor

KangOl commented Jan 28, 2019

Do web client handle correctly the 0/1 selection fields with the boolean widget?

@rco-odoo
Copy link
Member

@KangOl thanks for pointing that out, I haven't checked it.

@rco-odoo
Copy link
Member

@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.

@pedrobaeza
Copy link
Collaborator

@gurneyalex you had several reasons for using selection with integers instead of strings, do you?

@gurneyalex
Copy link
Contributor

gurneyalex commented Jan 28, 2019

@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

@rco-odoo
Copy link
Member

@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.

@rco-odoo
Copy link
Member

@KangOl are you okay with merging this?

@KangOl
Copy link
Contributor

KangOl commented Jan 28, 2019

Yes.

@rco-odoo
Copy link
Member

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Jan 28, 2019

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants