odoo/tutorials#1275

Created by Ayush Khubchandani (aykhu)

Blocked

label
odoo-dev:19.0-zero-stock-blockage-aykhu
head
f9ee2aefa881d08883b7c4fe072ead99f206c05c
odoo/tutorials
19.0 #1275 missing r+
master

[ADD] sale_zero_stock_approval: add zero stock approval control on sale orders

By default, sales users can confirm orders even when there is not enough available stock. While this provides flexibility, it can also lead to unintended commitments, stock inconsistencies, and reliance on manual validation.

This PR introduces a Zero Stock Approval mechanism to bring better control and accountability to such scenarios.

⚙️ Key Changes
Add a boolean field (zero_stock_approval) on sale orders
Restrict sales users from confirming orders with insufficient stock unless approval is granted
Allow sales managers to bypass this restriction
Make the field read-only for regular users and manageable by administrators
Extend confirmation logic to validate stock availability per order line

✅ Result
Controlled confirmation of zero-stock orders
Reduced risk of stock-related issues
Clear approval flow aligned with business rules
Improved reliability and traceability in sales operations