Soft Validation Before Save
Configurable Non-Blocking "Are You Sure?" Confirmations Before Form Save in Odoo 19
Prevent accidental typos, abnormally high invoice amounts, or inconsistent data inputs. Triggers a soft confirmation dialog allowing users to double-check or proceed without blocking the save workflow.
How Soft Validation Works
- Form Intercept: Intercepts the Save action on form views before data is permanently written to the database.
- Active Rule Evaluation: Sends current form values to the server to check against UI-configured rules for that model.
- Soft Confirmation Dialog: If an anomaly is detected, a confirmation popup appears with your custom title and message asking: "Are you sure?"
- Human Choice: The user can click Confirm to finish saving, or Cancel to adjust the form inputs.
- Fail-Safe Guarantee: If a rule cannot be evaluated due to technical errors or domain misconfigurations, it skips silently to ensure legitimate saves are never blocked.
Condition 1
Amount Threshold Rules
Select any numeric field (Integer, Float, Monetary), a comparison operator (>, >=, <, <=, =, !=), and a limit.
Example: Trigger confirmation if Total Amount > $10,000.
Condition 2
Discrepancy Domain Rules
Define custom Odoo domains to check form conditions that simple thresholds cannot cover.
Example: [('partner_id', '=', False)] or custom selection field states.
Supported Field Types for Validation
Note: Relational fields (Many2one, One2many, Many2many) are intentionally excluded from form payload evaluation to optimize performance. Keep domain rules targeted on the supported scalar field types listed above.
Confirmation Dialog Example
------------------------------------------------------------------ High Order Amount Warning ------------------------------------------------------------------ The total amount ($15,500.00) exceeds the configured threshold of $10,000.00. Are you sure you want to save this record? [ Cancel ] [ Confirm Save ] ------------------------------------------------------------------
Complete User Interface Walkthrough
A clean, standard Odoo UI matching the core accounting platform theme flawlessly.


| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 375 |
| Technical Name |
soft_validation_before_save |
| License | OPL-1 |
| Website | https://syncsoft.app |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module