odoo/tutorials#1184

Created by Jay H Patel (japat)

Blocked

label
odoo-dev:19.0-zero-stock-blockage-japat
head
2ba38cd7150385836fb4071f9fc2994ba820f853
odoo/tutorials
19.0 #1184 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.