Odoo Community Association

Sale Order Qty change no recompute

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

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.

Table of contents

Usage

To use this module, you need to:

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

Known issues / Roadmap

  • Having this module installed may alter test results of other modules expecting to have the price fields recomputed when changing quantities.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Tecnativa

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

victoralmau

This module is part of the OCA/sale-workflow project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.