odoo/tutorials#1184
Created by Jay H Patel (japat)
Blocked
- Merge method
- Review
-
CI
- ci/style: (runtime 1s)
- ci/tutorial: (runtime 144s)
- label
- odoo-dev:19.0-zero-stock-blockage-japat
- head
- a9de1c0c1a82e0e92d95bdc0c93437104de843d8
| odoo/tutorials | |
|---|---|
| 19.0 | #1184 missing statuses missing r+ |
| master |
[ADD] zero_stock_approval
Add a new boolean field zero_stock_approval to sale.order to control whether a sales user is allowed to confirm orders with insufficient available stock.
Sales users (non-managers) cannot confirm a sale order when stock is insufficient unless the approval checkbox is checked. Sales managers can always confirm regardless of the field value.
This enforces business rules for zero stock approvals and keeps the confirmation logic consistent with access rights.
The override of action_confirm checks each order line’s stock availability and prevents confirmation if conditions are not met.