OdooWiki OCA HUB

Sale purchase stock auto cancel

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

This module adds a company-level option to automatically cancel purchase orders generated from sales orders (through Dropship or MTO rules) when the corresponding sales order is canceled.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a company setting that automatically cancels purchase orders created from a sales order via MTO or Dropship when that sales order is cancelled.

This module gives you a new option in the Sales settings called "Propagate cancellation on MTO/Dropshipping". It is stored per company, so each company can decide separately whether it wants this behaviour.

When the option is switched on and a sales order is cancelled, Odoo looks at the purchase orders that were generated from that sales order through the Make To Order or Dropship routes and cancels them automatically. If the option is off, those purchase orders are left untouched.

Where to find it: - Settings, under the Sales app, in a new "Purchase Cancellation" section. - The setting is a simple checkbox with an explanation of what it does.

The module touches the company settings (res.company), the settings screen (res.config.settings) and the cancellation logic of sales orders (sale.order). It relies on the standard link between sales orders and their generated purchase orders, so it only affects purchase orders that really come from a sales order using MTO or Dropship.

Depends on

sale_purchase_stock
Models and fields (3)
  • sale.order · extends an existing model
  • res.company · extends an existing modelpurchase_auto_cancel (Propagate cancellation on MTO/Dropshipping)
  • res.config.settings · extends an existing modelpurchase_auto_cancel

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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

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

terminal Installation and usage

OCA documentation · Odoo 18.0
  • Go to Sales > Configuration > Settings.
  • Search and enable the option POs Auto Cancelation.
  • Create a sale order and add a line with a product that uses the MTO or Dropship route.
  • Confirm the sale order.
  • A new purchase order is created.
  • Cancel the sales order. The purchase order will be canceled automatically as well.

No verified information in OCA: Installation, Configuration.

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.