This module allows to set mininal, maximal, and multiple-of quantity constraints on product categories and products, and to check and optionally enforce these constraints on sale orders (either as strict blocking or soft warnings).
Table of contents
To set quantity constraints on a product: navigate to Sales > Products > Products, open the product, and on the Sales tab in the Qty Constraints section set corresponding values in the Min Qty, Max Qty, or Multiple-Of Qty fields.
Constraint Types:
- Min Qty: Minimum quantity required for a sale.
- Max Qty: Maximum quantity allowed for a sale.
- Multiple-Of Qty: Quantity must be a multiple of this value.
Enforcement Levels (Restrict): For each constraint, you can choose the enforcement level:
- Blocking: Strictly enforces the rule. The user cannot confirm the line with an invalid quantity.
- Warning: Displays a warning (yellow/orange indication) but allows
the user to proceed.
- Use Case: Use Warning when you want to allow flexibility, such as selling samples (below min qty) or clearing out leftover stock (remainder not matching multiple-of qty).
Auto-Suggest: When you select a product in a Sales Order line, if a Minimum Quantity is strictly enforced (Blocking) and the current quantity is not set (or is 0/1), the system will automatically populate the quantity with the Minimum Quantity.
To set quantity constraints on a product variant: navigate to Sales > Products > Product Variants, open the product variant, and on the Sales tab in the Qty Constraints section set corresponding values.
To set quantity constraints on a product category: navigate to Sales > Configuration > Product Categories, open the product category, and in the Sales Qty Constraints section set corresponding values.
The settings are inherited from the product category to the product, and from the product to the product variant. To override the inherited settings, check the checkbox next to the corresponding value and set the value in the product or product variant.
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.
- Akretion
- Mourad EL HADJ MIMOUN <mourad.elhadj.mimoune@akretion.com>
- Ooops:
- Ashish Hirpara <https://ashish-hirpara.com>
- Aion Tech:
- Simone Rubino <simone.rubino@aion-tech.it>
- CorporateHub
- Alexey Pelykh <alexey.pelykh@corphub.eu>
This module is maintained by the OCA.
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:
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.





