[18.0][FIX] vcp_management: Fix color_picker Owl crash on request label creation#10
Open
BhaveshHeliconia wants to merge 1 commit into
Open
[18.0][FIX] vcp_management: Fix color_picker Owl crash on request label creation#10BhaveshHeliconia wants to merge 1 commit into
BhaveshHeliconia wants to merge 1 commit into
Conversation
Author
|
@etobella @sebastienbeau @legalsylvain Could you please review this? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an Owl crash (
selectedColor is not a number) that occurs when trying to create a new Request Label (vcp.request.label).The
colorfield on thevcp.request.labelmodel was previously defined as afields.Char.When rendering the form view, the
color_pickerwidget (which uses the OwlColorListcomponent) expects a strict numeric integer for itsselectedColorprop in Odoo 18.0. Passing the default color index as a string caused the UI component to crash with a Javascript Promise error.Changed the
colorfield definition fromfields.Chartofields.Integer. This ensures the backend passes a strict numeric value to the frontend widget, completely resolving the crash while maintaining the expected 1-11 color palette functionality.