Sales MOQ & Pack Rules
Purpose
Sales MOQ & Pack Rules applies minimums, maximums, quantity multiples and case packs to sales lines. It extends quotations and product forms, with a rule simulator and an exception report. A suggested correction changes the quantity only when a user chooses the correction action.
This guide follows the Odoo 19 source, with a targeted Odoo 20 comparison. The practice workflow has not been executed in a running database.
Before you start
Install corvus_sale_quantity_rules for your Odoo major version. It requires Sales (sale_management); the manifest declares no Enterprise-only dependency. Your hosting must permit custom addons. Website carts require the separate Website MOQ & Pack Rules bridge.
Use the correct company and compatible product and rule units. Plan which customers, product variants, templates, categories, pricelists and channels need limits before creating overlapping rules.
Access and roles
Sales users can read rules and use correction actions on quotations they can edit. Quantity Rule Manager can create and maintain rules, use the simulator, record overrides and read exception events. Sales managers receive this group through the module's group configuration. Company rules limit rules and events to allowed companies. Normal Sales record access still applies; the special group does not replace access to the quotation or Settings.
Exception records are retained and cannot be manually edited, created or deleted through ordinary record operations.
Setup and menu
Open Sales → Configuration → Sales Quantity Rules. Give each rule a name, company, priority, channel and rule unit. Choose at most one product scope: Product Variant, Product Template, or Product Category. Category scope also covers descendants. Choose a Customer or Customer Tag, if required, and optionally a pricelist and effective dates.
Set at least one quantity: Minimum, Maximum, Quantity Multiple, Case Pack, or Default Sale Quantity. A default must itself satisfy the rule. When both a multiple and a case pack are set, valid quantities must satisfy both: a multiple of six and a case pack of four give an effective increment of twelve.
The action determines confirmation behavior:
| Action | Result for an invalid quantity |
|---|---|
| Warning | Shows guidance; the quantity rule does not block confirmation. |
| Hard Block | Requires a valid quantity or a current manager override. |
| Offer Round Up | Offers an explicit correction and blocks until corrected or overridden. |
Only one matching rule applies. Higher priority wins first; scope specificity and further product/customer/channel/unit tie-breakers determine equal-priority matches. Rules are not accumulated. Use Quantity Rule Simulator to check the actual winner.
In Sales Settings, the Sales Quantity Rules block has Default rule action, Return quantities, Zero quantities, and Service products. Defaults are Hard Block, Validate Absolute Quantity for returns, Ignore Zero, and service rules disabled. The default action preselects new rules; it is not a replacement for existing rule actions.
Workflow
- Open Sales → Configuration → Quantity Rule Simulator. Select the company, product, customer, optional pricelist, channel, date, sale unit and requested quantity. Choose Simulate. Review the applied rule, result and correction quantity.
- Create or open a quotation. Add the product and review Quantity Status and its guidance. A configured default can populate an initially selected product or a newly created line whose quantity was omitted.
- For an invalid quantity, review the nearest valid choices. Choose Correct on the line, Correct Quantity in its form, or Correct All Quantities on the quotation. These actions apply the calculated correction and record an exception event. The Invalid Quantities smart button also performs the bulk correction; it is an action, not a report link.
- If a justified exception is needed, a Quantity Rule Manager opens Override or Manager Override, enters a business reason and chooses Record Override. This permits the specific current rule, quantity and unit. Editing the rule or changing the quantity or unit can invalidate the override.
- Confirm the quotation. Non-warning violations without a current override block confirmation. Later edits of product, unit or quantity on confirmed sales lines are checked too.
- Review Sales → Reporting → Quantity Rule Exceptions. Filter Corrections or Overrides and inspect the actor, quantities, channel and reason; list, pivot and graph views are available.
Practice scenario
In an authorised test database, create a fictional product, “Harbor Ceramic Cup”, with a rule in Units: Minimum 10, Quantity Multiple 6, Case Pack 4, Maximum 30, Action Offer Round Up. Simulate 13 units. The source-derived result is invalid, with 12 and 24 as nearest valid quantities and 24 as the proposed correction. On a draft quotation, choosing Correct should change 13 to 24 and create a correction event. Simulating 31 instead proposes 24 because the next increment exceeds the maximum. This example has not been run.
Troubleshooting and limitations
An incompatible rule unit is a configuration error: a manager must correct the rule unit or product scope. An override cannot repair that error. If no valid correction exists within the bounds, change the configuration or quantity rather than repeatedly pressing Correct.
Corrections and overrides are restricted to draft or sent quotations. Sections, notes and down payments are skipped; service, negative and zero quantities follow the company settings. Return/zero blocking policies do not create an overridable product rule by themselves. The simulator evaluates absolute requested quantities against a matching rule, so also check company return and zero handling on the quotation.
The Invalid Quantities count measures violations, even when a manager override currently permits confirmation. Correction prefers the upper valid amount but can use a lower amount when the maximum prevents rounding upward.
Versions and useful links
Catalogue-qualified versions are Odoo 15, 16, 18, 19 and 20. Odoo 17 source is also present, but that pair is not catalogue-qualified. The workflow above is reviewed for 19.0; 15–18 workflows remain unreviewed here. The targeted 20.0 comparison retains the core quantity workflow and moves access rules into Odoo 20's access format.
Use the catalogue-qualified Odoo 19 Live Test selector to request a demo. The selector was checked against the live catalogue; no demo was launched. For purchase, open the Corvus apps catalogue and choose your exact Odoo version.