Skip to content
Snippets Groups Projects
Commit 2a101c13 authored by Hubert Van de Walle (huvw)'s avatar Hubert Van de Walle (huvw)
Browse files

[FIX] web: boolean_toggle widget ignores readonly attribute


The boolean_toggle should only be disabled when there is a readonly
modifier, not when the view is in readonly mode.

Cause of the issue

  The input was disabled but the `_onClick` was registered on the
  widget root node.

Solution

  - Listen for clicks on the input element
  - Override the render method to set the disabled prop according to the
    readonly modifier.

opw-2739468

closes odoo/odoo#91465

X-original-commit: 8021562b
Signed-off-by: default avatarMichaël Mattiello <mcm@odoo.com>
Signed-off-by: default avatarHubert Van De Walle <huvw@odoo.com>
parent 98e3dcea
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment