Order Min/Max Rules - Minimum Order Amount, Quantity Limits & Pack Size Steps
by Modvanta https://modvantaapps.tech/odoo-apps/order-min-max-rules/$ 4.99

Minimum order amounts, maximum quantities and pack sizes - in the shop and on every sales order
Set a minimum and maximum quantity and a pack size per product, and a minimum or maximum order amount per customer or for everyone. The shop rounds quantities to whole packs and tells the shopper what is missing; sales orders that break a rule cannot be confirmed.
Written and supported by Modvanta - modvantaapps@gmail.com
What it does
Wholesale and B2B shops rarely sell single units or tiny orders, but standard Odoo has no way to say sold in packs of 6, at least 500 per order, or no more than 2,000 for this customer.
This module adds those rules. On the product: minimum and maximum sale quantity, a pack size (or the product's packaging) and whether a wrong quantity is rounded up to the next pack or rejected. On the customer: minimum and maximum order amount. And general rules for all customers or one customer.
In the shop the product page says Sold in packs of 6 Units, the cart rounds 7 up to 12, and the cart total says Add 374.00 more to reach the minimum order of 500.00. In the backend, confirming an order that breaks a rule is refused with the reason.
Who it is for
Wholesalers and distributors Sell in cases and cartons only, with a sensible minimum order. | B2B shops Per-customer minimum and maximum order amounts, for credit or logistics reasons. | Any shop with small-order costs A minimum order amount shown clearly in the cart. |
Key features
All screenshots were taken on Odoo 19 with this module installed on a clean demo database (company Northwind Trading Co, default website theme). The Drawer is sold in packs of 6, minimum 6, maximum 60; a rule asks for a minimum order of 500; Azure Interior has a maximum order amount of 2,000.
Feature 1
Quantity rules on the product
Below the sales price: Min sale qty, Max sale qty, Use packaging as step, Sold in packs of, and Step behaviour (Round up to the next pack, or Reject with a message).

Feature 2
The product page tells the shopper
The page shows Sold in packs of 6 Units and the quantity starts at 6.

Feature 3
The cart keeps whole packs
Asking for 7 drawers puts 12 in the cart - the next whole pack - with the pack note under the line. The check also covers quantity changes in the cart and calls that skip the page.

Feature 4
Minimum order amount in the cart
Under the cart total: Add 374.00 more to reach the minimum order of 500.00.

Feature 5
General rules
Sales > Configuration > Order Min/Max Rules: minimum and maximum order amounts for all customers or for one customer, with sequence and an optional note.

Feature 6
Limits per customer
The customer's Sales & Purchase tab has Min order amount and Max order amount; they take priority over general rules.

Feature 7
Orders that break a rule cannot be confirmed
Confirming a 2,025.00 quotation for a customer with a 2,000.00 maximum: Your order of 2,025.00 is over the maximum of 2,000.00.

How it works, step by step
| 1 | Set product rules On each product: min and max sale quantity, pack size or packaging, and the step behaviour. |
| 2 | Set amount rules Sales > Configuration > Order Min/Max Rules, and/or Min and Max order amount on a customer. |
| 3 | Shoppers order The shop keeps quantities to whole packs and shows what is missing for the minimum order. |
| 4 | Staff confirm A sales order that breaks a rule is refused at confirmation with the reason. |
Settings
No global settings: the rules live on products, customers and the rules list.
| Min sale qty / Max sale qty | Per product; 0 means no limit. |
| Sold in packs of | Quantities must be a whole multiple; 0 disables. Or tick Use packaging as step. |
| Step behaviour | Round up to the next pack (default) or Reject with a message. |
| Min / Max order amount | On the customer's Sales & Purchase tab. |
| Order Min/Max Rules | General rules for all customers or one customer, with sequence, company and Apply on confirm. |
Frequently asked questions
Which wins, the customer's limit or a general rule?
The amounts set on the customer come first; general rules fill in what the customer does not set.
Can a shopper bypass the pack size?
No. Cart updates go through the same check, so a quantity that is not a whole pack is rounded up (or rejected) whatever page sent it.
Does it apply to backend sales orders?
Yes, an order that breaks a rule cannot be confirmed.
Can I use the product's packaging as the pack size?
Yes, tick Use packaging as step.
Compatibility
Odoo 19 Community and Enterprise | Depends on Sales, eCommerce | Tested 37 automated tests |
Sell in the quantities and order sizes that work for you
Questions before you buy, help with setup, or a change for your own workflow - write to us and a developer answers.
SUPPORT | AUTHOR Modvanta | INCLUDED Lifetime module updates for Odoo 19 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Sales (sale_management)
• eCommerce (website_sale) • Discuss (mail) • Invoicing (account) • Website (website) |
| Lines of code | 470 |
| Technical Name |
mdv_order_min_max_rules |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/order-min-max-rules/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module