OdooWiki OCA HUB

Sale Order Line Cancel

sale_order_line_cancel folder_open OCA/sale-workflow open_in_new
Sales License: AGPL-3

This module allows you to cancel the remaining quantity on sale order by adding a dedicated action to sale lines. It also add two new fields to track canceled and remaining to deliver quantities.

This module differs from the original odoo behavior in the following way:

  • In odoo, if the update of the quantity ordered is allowed on the sale order at the confirmed state, odoo will recompute the required stock operations according to the new quantity. This change is possible even the stock operations are started for this sale order line.
  • In this module, you can either decide if only the canceled quantity gets tracked or if it also should decrease the original ordered quantity.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a 'Cancel remaining qty' button on sale order lines to stop delivering what is left, and tracks canceled and remaining-to-deliver quantities. A company setting decides whether canceling also reduces the ordered quantity.

This module lets sales users cancel the quantity that is still to be delivered on a confirmed sale order line, without touching what has already been delivered.

Where it appears: - On the sale order form and on the sale order lines list, a small ban icon button 'Cancel remaining qty' appears on lines that still have something to deliver. - The same button is available on the read-only sale order line form. - Two optional columns, 'Canceled' and 'To Deliver', can be shown in the order lines list.

What it does: - Clicking the button opens a small confirmation wizard; validating it records the canceled quantity on the line and posts a message in the order's chatter saying the line has been canceled. - The line shows 'Qty canceled' and a computed 'Remains to deliver' (ordered minus delivered minus canceled). - The button is only available for confirmed orders and when something remains to deliver.

Business rule: - A company setting, found in Sales settings, decides whether canceling the remaining quantity also lowers the original ordered quantity. When enabled, the ordered quantity is reduced to what was already delivered; when disabled, only the canceled quantity is tracked. - If the ordered quantity is later increased and the setting is on, the canceled quantity is reduced accordingly. - Resetting an order to draft clears the canceled quantities on its lines.

Depends on

sale

Required by other modules

Models and fields (5)
  • sale.order · extends an existing model
  • res.company · extends an existing modelon_sale_line_cancel_decrease_line_qty (On sale order line cancel decrease line quantity)
  • sale.order.line · extends an existing modelproduct_qty_canceled (Qty canceled), can_cancel_remaining_qty, product_qty_remains_to_deliver (Remains to deliver)
  • res.config.settings · extends an existing modelon_sale_line_cancel_decrease_line_qty
  • sale.order.line.cancel · new model

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

Sources · Odoo 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/sale-workflow.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.