| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 26 |
| Technical Name |
require_numeric_field |
| License | AGPL-3 |
Enhanced Numeric Field Validation
By default, Odoo skips validity checks on required numeric fields. This module enhances the functionality of numeric fields by restricting 0 as a value and ensuring proper numeric input.
✨ Features
- Prevents users from entering 0 in required numeric fields.
- Displays a warning if a user tries to leave a numeric field empty.
- Improves data integrity by enforcing proper numeric input.
-
Allows developers to define a context key
skip_check_requirementto bypass the numeric validation rule when necessary.Example: <field name="x_amount" context="{'skip_check_requirement': True}"/>
⚡ Usage
- When creating or editing a record with a required numeric field, users will see a warning if they enter 0 or leave the field blank.
🏆 Benefits
- Ensures numeric fields always have valid, non-zero values.
- Reduces errors caused by missing or invalid numeric input.
Install this module to enhance the behavior of numeric fields and enforce proper validation automatically.
Please log in to comment on this module