OdooWiki OCA HUB

Sale Order Qty change no recompute

sale_order_qty_change_no_recompute folder_open OCA/sale-workflow open_in_new
Sale Workflow License: AGPL-3

A lot of businesses don't set different prices according to the quantity of the product to sell, and they find it very annoying to set a manual discount after the negotiation with the customer, only to see it changed when they vary the demanded quantity.

Since Odoo 18.0, the unit price is natively protected from recomputation when modified manually (via the technical_price_unit field). However, the discount and pricelist_item_id fields are still recomputed when the quantity or unit of measure changes.

This module prevents this by avoiding the recomputation of the discount and pricelist item fields if only the quantity or unit of measure has been changed in the sales order line.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Stops Odoo from recalculating the discount and pricelist item on a sales order line when only the quantity or unit of measure is changed, so negotiated prices stay as agreed.

When you negotiate a price or a manual discount with a customer on a sales order line, changing the ordered quantity or the unit of measure normally makes Odoo recalculate those values and wipe out your negotiation. This module changes that behaviour on sales order lines.

  • The discount and the pricelist item applied to a line are no longer recomputed just because the quantity or the unit of measure changed.
  • The unit price was already protected by Odoo itself; this module extends the same protection to the discount and the pricelist item.
  • It works silently in the background: there is no new menu, screen, button or setting to configure.
  • It only affects sales order lines (sale.order.line); other documents and models keep their normal recalculation behaviour.

In practice, salespeople can adjust quantities during a negotiation without losing the manual discount or the price list rule they had set, which avoids re-entering the discount after every quantity change. No new fields, reports, emails or scheduled actions are added.

Depends on

sale

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: 7 confirmed, 2 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

OCA documentation · Odoo 18.0

To use this module, you need to:

  • Create a new sale order.
  • Add a product line and set a custom discount.
  • Save the sale order.
  • Edit the sale order and change the quantity (the custom discount will not be reset).

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.