Skip to main content
Odoo Community Association

Web Widget Numeric Step

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

This widget changes input number field and make it easier to increment the number thanks to 2 buttons (+ and -). Use JS native logic for input number, so you can use the options min, max, step, placeholder.

Table of contents

Usage

In your xml view, add widget="numeric_step" to a float or integer field. This will add the 2 buttons “+” and “-” just next to the input field in edit mode. Iteration step by default is 1.

image1

Optional

Add an option to choose the step iteration and limits (min and max values).

Example for an 0.25 step, min to -1 and max to 10 :

<field name="sale_delay" widget="numeric_step" options="{'step': 0.25, 'min': -1, 'max': 10}" /> days

Available Options

  • step > Amount to increase/decrease (default: 1.0)

  • min > Min. value allowed (default: no limit)

  • max > Max. value allowed (default: no limit)

  • auto_select > Select the content when the element get focus (default: False)

  • placeholder > Define the placeholder text (default: None)

  • class > Define additional classes for the input (default: None)

Examples

Iteration with 0.25 step, min to -1 and max to 10.

Start to increment with button, continue incrementing with scrolling mouse.

image2

Iteration with 10 step, max limit 15, placeholder with onchange

image3

Demo

You can test the feature by going to Settings > Technical > Reporting > Paper Format. The fields “Top Margin (mm)” and “Bottom Margin (mm)” are configured to use the widget with 0.5 step, min to 0 and max to 100, and the fields “Left Margin (mm)” and “Right Margin (mm)” with 1 step, min to 0 and max to 50. The integer field “Header spacing” is configured with 5 step, min to 0 and max to 100.

Known issues / Roadmap

When the value is entered using the keyboard, the limits set in the widget can be exceeded

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • GRAP

  • Tecnativa

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

rafaelbn yajo

This module is part of the OCA/web project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo-addon-web-widget-numeric-step 20.0.1.0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-web-widget-numeric-step 20.0.1.0.0.2
File Interpreter ABI Platform Actions
odoo_addon_web_widget_numeric_step-20.0.1.0.0.2-py3-none-any.whl Python 3 none any Details for odoo_addon_web_widget_numeric_step-20.0.1.0.0.2-py3-none-any.whl

Release files / odoo_addon_web_widget_numeric_step-20.0.1.0.0.2-py3-none-any.whl

Download URL odoo_addon_web_widget_numeric_step-20.0.1.0.0.2-py3-none-any.whl
Size 272.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a77c28cde46a5337a8bb00a2970c2235ea27b6f27d466776bdd6bf91e16b529
BLAKE2b-256 checksum
How to use checksums
736d42b937bcd8e3600eb241967842980f4bb1f01bb903ba2f835cac17a4c711
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for odoo-addon-web-widget-numeric-step 20.0.1.0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

20.0.1.0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page