| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 174 |
| Technical Name |
evo_non_negative_widget |
| License | LGPL-3 |
| Website | https://evozard.com/ |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 174 |
| Technical Name |
evo_non_negative_widget |
| License | LGPL-3 |
| Website | https://evozard.com/ |
| Versions | 16.0 17.0 18.0 19.0 |
Prevent Negative Values in Odoo Numeric Fields
Odoo 18 • Real-Time Integer & Float Field Validation
Stop users from entering negative quantities or amounts in Integer and Float fields with real-time validation and warning notifications - no backend changes required.
Zero Backend Changes Required
Lightweight client-side OWL widget validation - no Python model overrides needed. Works seamlessly across form views, editable list views, and one2many lines.
Key Highlights
Non-Negative Integer Widget
If the user types a negative number in an Integer field, the value is automatically reset to 0 and a warning notification is shown instantly.
Non-Negative Float Widget
Same protection for Float fields - supports decimal values and numpad input. Negative entries are corrected to 0.0 without disrupting user flow.
Smart Warning Notification
Warning toast appears only once per input session (debounced to 3 seconds), avoiding notification spam.
No "Invalid Fields" Odoo Error
Widget silently returns 0 instead of throwing a parse error - keeping the form saveable while still alerting the user.
No Backend Changes Required
Pure client-side OWL widget - apply non-negative constraints on any field without Python model overrides.
Works on All Editable Views
Compatible with form views, editable tree/list views, and embedded one2many lines across all Odoo modules.
Integer Field Validation
Integer field - negative value entered
Integer field - auto-corrected to 0 with warning
Float Field Validation
Float field - negative decimal entered
Float field - auto-corrected to 0.0 with warning
Our Features
Non-Negative Integer Widget
Non-Negative Float Widget
Smart Warning Notification (Debounced)
No "Invalid Fields" Odoo Error
No Backend Override Required
Works on Form, List & One2many Views
Numpad & Decimal Input Supported
Odoo 16, 17, 18 & 19 Compatible
Compatible with Custom Modules
Frequent Questions
Is this app compatible with Odoo Enterprise as well as Community?
Yes, the app works perfectly with Odoo Enterprise (On-premise and Odoo.SH) as well as Community. Odoo Online (Cloud) does not allow installation of third-party apps.
Does this widget work on both form view and list (tree) view?
Yes. The widgets can be used in any view type that supports editable fields - including form views, editable list views, and embedded one2many lines.
What happens when a user enters a negative number?
The widget silently corrects the value to 0 and displays a warning notification. The form remains fully saveable - there is no Odoo "Invalid Fields" error shown to the user.
Need customization? Who to contact?
Please contact us on Skype:
evozard.consulting or email: support@evozard.com
Overview
This module prevents users from entering negative values in Integer and Float fields across all editable Odoo views. It uses lightweight OWL client-side widgets - no backend model changes required.
Why Use This Module?
This Application is Suitable For
Installation Example
Simply add the widget attribute to any Integer or Float field in your view XML:
<field name="quantity" widget="non_negative_integer"/>
<!-- For Float fields -->
<field name="price" widget="non_negative_float"/>
Installation Steps:
- Download the module and place it in your Odoo addons folder
- Verify dependencies: web
- Update App list (Settings → Apps → Update App List)
- Install Prevent Negative Values
- Add the widget attribute to desired fields in your view XML
Developer Friendly:
- Easy widget integration - single attribute on any field
- No backend override required
- Lightweight client-side validation
- Supports editable tree & one2many views
- Numpad & decimal input supported
Technical Specifications
Contact Us
Support & Contact
Need help? Our team is ready to assist you.
- Email: evozard@gmail.com
- Skype: evozard.consulting
- Documentation: Included in the module
Compatible: Odoo 18 • Community & Enterprise • Odoo.sh
© 2026 EVOZARD • All Rights Reserved
Prevent Negative Values in Odoo Integer & Float Fields
Please log in to comment on this module