-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[17.0][IMP] web_widget_x2many_2d_matrix: Support selection type #3215
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
[17.0][IMP] web_widget_x2many_2d_matrix: Support selection type #3215
Conversation
…2Many2DMatrixRenderer to support selection type
|
Hi @JasminSForgeFlow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the X2Many2DMatrixRenderer to use a switch on field type, extending support for selection fields alongside existing many2one handling.
- Replaced an
ifcheck formany2onewith aswitchonrecord.fields[…].type - Preserved
many2onelogic and added aselectioncase to map selection values to their labels
Comments suppressed due to low confidence (1)
web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js:37
- Add unit tests for the new
selectioncase to verify that selection values are correctly mapped to their labels under various scenarios.
case "selection": {
...y_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js
Show resolved
Hide resolved
|
Hi @hbrunn, could you please take a look at this when you have a moment?. Thanks in advance! 🙏 |
hbrunn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a refactoring of this eventually such that column and row headers are rendered by the field type's widget, but that might be a bit too much to ask for this specific case.
Would be good to port to v18 too
|
I'll check it out. |
|
No doubt your solution is much more complete, so I’m canceling this. Thanks a lot for your contribution! |
Enhance column value handling in X2Many2DMatrixRenderer to support selection type