[FIX] web_widget_numeric_step: disable buttons on readonly fields

Before this patch, if a field was readonly, the user could still use the +/- buttons to alter its value. Not good!

@moduon MT-4396
pull/2906/head
Jairo Llopis 2023-12-12 11:04:30 +00:00 committed by Carlos Roca
parent a9c6da55df
commit 886ae3dc55
4 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ Web Widget Numeric Step
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c08fb28b580ac9ab7d0f86b19ed2ded973fdf39e527ecad4a74fd87e11689f6f
!! source digest: sha256:672d53d5bf482d0938c82f0a39d665f9f5d133fe3dd5401bcb9488ac95797c12
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

View File

@ -5,7 +5,7 @@
{
"name": "Web Widget Numeric Step",
"category": "web",
"version": "16.0.1.0.1",
"version": "16.0.1.0.2",
"author": "GRAP, Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",

View File

@ -366,7 +366,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c08fb28b580ac9ab7d0f86b19ed2ded973fdf39e527ecad4a74fd87e11689f6f
!! source digest: sha256:672d53d5bf482d0938c82f0a39d665f9f5d133fe3dd5401bcb9488ac95797c12
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_widget_numeric_step"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This widget changes input number field and make it easier to increment the number thanks to 2 buttons (+ and -).

View File

@ -18,6 +18,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
title="Minus"
type="button"
data-mode="minus"
t-att-disabled="props.readonly"
t-on-click="_onStepClick"
/>
</div>
@ -39,6 +40,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
title="Plus"
type="button"
data-mode="plus"
t-att-disabled="props.readonly"
t-on-click="_onStepClick"
/>
</div>