Overview
Odoo 19 refuses to delete a line of a confirmed sales order and asks you to set the quantity to zero instead. This leaves many dead lines on the order and cancelled lines on the delivery. This module allows the deletion when the line is safe to remove: zero quantity for a stored product, no validated delivery, no invoice attached and an unlocked order. Its stock moves are removed with it, and a delivery left empty is deleted. Every deletion is logged in the order chatter, and a line that fails a check keeps the standard behaviour and is refused with the reason. It adds no menu, setting or group, so existing sales user rights decide who can delete.
Usage steps
- 1
Open a confirmed sales order
Open Sales > Orders and select a confirmed order whose line quantity was set to zero.
- Stored products must have zero ordered quantity
- Non-stored products may have any quantity
- 2
Delete the line
In the Order Lines tab, use the delete icon on the line as you would on a draft quotation.
- No new button or menu is added
- Existing sales user rights apply
- 3
Safety checks run automatically
The module refuses deletion when goods were delivered, a transfer was validated, an invoice is attached or the order is locked.
- Lines linked to purchase, manufacturing or project tasks are refused
- A refusal shows the reason
- 4
Stock moves are cleaned up
After a successful deletion the line's pending stock moves are removed from the delivery under Inventory > Operations > Deliveries.
- A delivery that becomes empty is deleted
- Combo lines are checked together; one blocked child refuses all
- 5
Review the chatter log
Open the chatter of the sales order to see a note for every deleted line.
- Provides an audit trail of removed lines
- Combo children are listed too
Screens
Illustrative mockups with placeholder data.
Chatter log after deleting a line
Sales line removed: <product>. Placeholder value
Its stock moves were removed from: <delivery>. Placeholder value
Refusal message
Once a sales order is confirmed, a line can be removed only when nothing was delivered and it is not invoiced. Placeholder value
A stored product also needs its quantity set to 0 first. Placeholder value
- <product>: goods were already delivered Placeholder value
Roles
| Role |
|---|
| Sales user |
| Sales manager |
| Warehouse user |
Dependencies
- sale_stock
Related applications
Applications that work together with this one.
Sales Order Lock on Delivery
Locks sales orders on delivery, which this module respects when refusing deletion.
osloop_sale_lock_on_deliverySales Access Control
Controls sales access rights that decide who may delete order lines.
osloop_sale_access_controlInvoice Shortcuts in Sales and Purchase
Shares the sales order and invoice workflow area.
osloop_sale_purchase_invoice_menuWant to know more or try this app? Contact us
Delete a zero-quantity line from a confirmed sales order and remove its stock moves from the delivery.