Skip to content

[18.0][FIX] vcp_management: Fix color_picker Owl crash on request label creation#10

Open
BhaveshHeliconia wants to merge 1 commit into
OCA:18.0from
HeliconiaIO:18.0-fix-vcp_management
Open

[18.0][FIX] vcp_management: Fix color_picker Owl crash on request label creation#10
BhaveshHeliconia wants to merge 1 commit into
OCA:18.0from
HeliconiaIO:18.0-fix-vcp_management

Conversation

@BhaveshHeliconia

Copy link
Copy Markdown

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 color field on the vcp.request.label model was previously defined as a fields.Char.
When rendering the form view, the color_picker widget (which uses the Owl ColorList component) expects a strict numeric integer for its selectedColor prop 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 color field definition from fields.Char to fields.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.

@BhaveshHeliconia

BhaveshHeliconia commented Jul 3, 2026

Copy link
Copy Markdown
Author

@etobella @sebastienbeau @legalsylvain Could you please review this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants