OdooWiki OCA HUB

Sale auto remove zero quantity lines

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

Upon confirming a sales order remove any sales order lines that have zero quantities.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a company-level setting that automatically deletes sales order lines with zero quantity (and empty note lines) when a sales order is confirmed, leaving a message in the order's chatter.

This module gives you a new option in the Sales settings: "Automatic Removal of Zero Quantity Lines". When it is turned on for a company, confirming a sales order will automatically delete any order line whose product quantity is zero, as well as any empty note lines (lines with no text).

  • The setting is company-dependent, so each company can decide separately whether to use it.
  • The option appears in the Sales settings screen, right after the online signature setting.
  • When lines are removed, a message is posted in the order's chatter saying that some lines with zero quantities or empty notes were removed upon confirmation.
  • The removal happens before the normal confirmation process continues, so the order is confirmed without those lines.

The module touches the sales order model (sale.order), the company model (res.company) and the configuration settings model (res.config.settings). It does not add new menus or reports; it only adds one checkbox in the existing Sales configuration screen and changes the behaviour of the Confirm button on sales orders.

Depends on

sale
Models and fields (3)
  • sale.order · extends an existing model
  • res.company · extends an existing modelsale_auto_remove_zero_quantity_lines
  • res.config.settings · extends an existing modelsale_auto_remove_zero_quantity_lines (Automatic Removal of Zero Quantity Lines)

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: 3 confirmed, 6 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

To enable this feature you need to:

  • Go to Sale \> Settings \> Quotation & Orders.
  • Check Automatic Removal of Zero Quantity Lines

No verified information in OCA: Installation, Usage.

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.