Skip to Content
osloop_sale_zero_line_delete

Delete Zero-Quantity Sale Lines

Delete a zero-quantity line from a confirmed sales order and remove its stock moves from the delivery.

  • Odoo 19
  • Sales
  • 19.0.1.0.4
1

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.

2

Usage steps

  1. 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. 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. 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. 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. 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
4

Roles

Benefiting roles
Role
Sales user
Sales manager
Warehouse user
5

Dependencies

  • sale_stock

Want 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.

Contact us