Sale Order Restrict Cancel Existing Invoice
This module restrict Sale Order cancellation if a confirmed invoice linked to that Sale exists.
auto_awesome What this module does
AI-generated from the code · Odoo 15.0Prevents users from cancelling a sale order when a confirmed (posted) customer invoice is linked to it, showing a clear error message instead.
This module adds a safety rule to the Sales app: once a sale order has a confirmed invoice, you can no longer cancel that order.
- A new technical field on the sale order collects all invoices linked to it that are in a confirmed state (posted).
- When you try to cancel a sale order, Odoo checks this field. If any confirmed invoice exists, the cancellation is blocked and an error message appears: "You cannot cancel a Sale Order for which a confirmed invoice exists!"
- The rule applies to the sale order screen and any other place where cancellation is triggered.
- The module only touches the
sale.ordermodel and does not add new menus or screens. - It works automatically in the background; no configuration is needed.
Depends on
Models and fields (1)
- sale.order · extends an existing modelconfirmed_invoice_ids
Text generated by AI (DeepSeek) from reading the Odoo 15.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-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 15.0
Confirmed on 2026-11-03 in branch 15.0 of OCA/sale-workflow.
terminal Installation and usage
OCA documentation · Odoo 15.0Usage
Source · Odoo 15.0- Create a Sale Order and confirm it (and deliver products if needed)
- Create Invoice and confirm it
- On Sale Order, try to click on 'Cancel'. An error should occur
No verified information in OCA: Installation, Configuration.
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.
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.