Sale order min quantity

sale_restricted_qty
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/17.0/sale_restricted_qty
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSAlexey Pelykh, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows to define min, max and multiple order quantity on
product. Min and Max order quantity is either required or recommended.
If you check "Force min/max Qty" on product the min/max qty do not block
sale order. This can be used if the available stock is less then the min
qty or if you want to sell sample products. Max qty can be used if we
dont want to sale more than available qty (end of series product)

Settings are defined on product, if values are not set we use settings
from product template. If settings are not set on product template we
use settings from product category otherwise parent category.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
min_order_qty_product_product_form_view product.product.form product.product group Inherits product.product_normal_form_view
view_order_form sale.order xpath Inherits sale.view_order_form
view_product_category_form product.category xpath Inherits product.product_category_form_view
view_product_template_form product.template group Inherits product.product_template_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (10)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale max qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " recursive=True store=True string='Force Max Qty'
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale min qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " recursive=True store=True string='Force Min Qty'
  • manual_force_sale_max_qty Selection
    default='use_parent' help='If force max qty is checked, the max quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Max Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_force_sale_min_qty Selection
    default='use_parent' help='If force min qty is checked, the min quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Min Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_sale_max_qty Float
    digits='Product Unit of Measure' string='Max Sale Qty'
  • manual_sale_min_qty Float
    digits='Product Unit of Measure' string='Min Sale Qty'
  • manual_sale_multiple_qty Float
    digits='Product Unit of Measure' string='Multiple Sale Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale max qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " recursive=True store=True
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale min qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " recursive=True store=True
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale multiple qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " recursive=True store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • is_qty_bigger_max_qty Boolean
    compute='_compute_is_qty_bigger_max_qty' string='Qty > max Qty'
  • is_qty_less_min_qty Boolean
    compute='_compute_is_qty_less_min_qty' string='Qty < Min Qty'
  • is_qty_not_multiple_qty Boolean
    compute='_compute_is_qty_not_multiple_qty' string='Not Multiple Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Max Qty'
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Min Qty'
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Multiple Qty'
Public methods (1)
  • check_constraint_restricted_qty(self)
    @api.constrains('product_uom_qty', 'sale_min_qty', 'sale_max_qty', 'sale_multiple_qty')
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/16.0/sale_restricted_qty
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:45
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
min_order_qty_product_product_form_view product.product.form product.product xpath Inherits product.product_normal_form_view
view_order_form sale.order xpath Inherits sale.view_order_form
view_product_category_form product.category xpath Inherits product.product_category_form_view
view_product_template_form product.template group Inherits product.product_template_form_view
Models touched (5)

New fields (5)
  • force_sale_max_qty Boolean
    recursive=True
  • force_sale_min_qty Boolean
    recursive=True
  • sale_max_qty Float
    recursive=True
  • sale_min_qty Float
    recursive=True
  • sale_multiple_qty Float
    recursive=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (10)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale max qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True string='Force Max Qty'
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale min qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True string='Force Min Qty'
  • manual_force_sale_max_qty Selection
    default='use_parent' help='If force max qty is checked, the max quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Max Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_force_sale_min_qty Selection
    default='use_parent' help='If force min qty is checked, the min quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Min Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_sale_max_qty Float
    digits='Product Unit of Measure' string='Max Sale Qty'
  • manual_sale_min_qty Float
    digits='Product Unit of Measure' string='Min Sale Qty'
  • manual_sale_multiple_qty Float
    digits='Product Unit of Measure' string='Multiple Sale Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale max qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale min qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale multiple qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • is_qty_bigger_max_qty Boolean
    compute='_compute_is_qty_bigger_max_qty' string='Qty > max Qty'
  • is_qty_less_min_qty Boolean
    compute='_compute_is_qty_less_min_qty' string='Qty < Min Qty'
  • is_qty_not_multiple_qty Boolean
    compute='_compute_is_qty_not_multiple_qty' string='Not Multiple Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Max Qty'
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Min Qty'
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Multiple Qty'
Public methods (1)
  • check_constraint_restricted_qty(self)
    @api.constrains('product_uom_qty', 'sale_min_qty', 'sale_max_qty', 'sale_multiple_qty')
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/14.0/sale_restricted_qty
VERSION
VERSION 1.1.4
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSAlexey Pelykh, OCA Transbot, Víctor Martínez, oca-travis, Weblate, OCA-git-bot, sergiocorato, oca-ci, Ilyas, Ashish Hirpara
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openupgradelib
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_order_form sale.order xpath Inherits sale.view_order_form
view_product_category_form product.category xpath Inherits product.product_category_form_view
view_product_template_form product.template group Inherits product.product_template_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (10)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale max qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " store=True string='Force Max Qty'
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale min qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " store=True string='Force Min Qty'
  • manual_force_sale_max_qty Selection
    default='use_parent' help='If force max qty is checked, the max quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Max Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_force_sale_min_qty Selection
    default='use_parent' help='If force min qty is checked, the min quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Min Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_sale_max_qty Float
    digits='Product Unit of Measure' string='Max Sale Qty'
  • manual_sale_min_qty Float
    digits='Product Unit of Measure' string='Min Sale Qty'
  • manual_sale_multiple_qty Float
    digits='Product Unit of Measure' string='Multiple Sale Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale max qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " store=True
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale min qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " store=True
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' help="Define sale multiple qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categories " store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • is_qty_bigger_max_qty Boolean
    compute='_compute_is_qty_bigger_max_qty' string='Qty > max Qty'
  • is_qty_less_min_qty Boolean
    compute='_compute_is_qty_less_min_qty' string='Qty < Min Qty'
  • is_qty_not_multiple_qty Boolean
    compute='_compute_is_qty_not_multiple_qty' string='Not Multiple Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Max Qty'
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Min Qty'
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits='Product Unit of Measure' store=True string='Multiple Qty'
Public methods (1)
  • check_constraint_restricted_qty(self)
    @api.constrains('product_uom_qty', 'sale_min_qty', 'sale_max_qty', 'sale_multiple_qty')
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/12.0/sale_restricted_qty
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSOCA Transbot, Sébastien BEAU, oca-travis, Weblate, OCA-git-bot, sergiocorato, Mourad
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - decimal_precision
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openupgradelib
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
min_order_qty_product_product_form_view product.product.form product.product group Inherits product.product_normal_form_view
view_order_form sale.order xpath Inherits sale.view_order_form
view_product_category_form product.category xpath Inherits product.product_category_form_view
view_product_template_form product.template group Inherits product.product_template_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (10)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale max qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True string='Force Max Qty'
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' help="Define if user can force sale min qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True string='Force Min Qty'
  • manual_force_sale_max_qty Selection
    default='use_parent' help='If force max qty is checked, the max quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Max Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_force_sale_min_qty Selection
    default='use_parent' help='If force min qty is checked, the min quantity is only indicative value.If is not test we check parent value' required=True string='Manual Force Min Qty' args: [('use_parent', 'Use Parent Setting'), ('force', 'Yes'), ('not_force', 'No')]
  • manual_sale_max_qty Float
    digits=dp.get_precision('Product Unit of Measure') string='Max Sale Qty'
  • manual_sale_min_qty Float
    digits=dp.get_precision('Product Unit of Measure') string='Min Sale Qty'
  • manual_sale_multiple_qty Float
    digits=dp.get_precision('Product Unit of Measure') string='Multiple Sale Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') help="Define sale max qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') help="Define sale min qty 'If not set, Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') help="Define sale multiple qty 'If not set', Odoo will use the value defined in the parent object.Hierarchy is in this order :Product/product Template/product category/parent categoroies " store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • force_sale_max_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • force_sale_min_qty Boolean
    compute='_compute_sale_restricted_qty' readonly=True store=True
  • is_qty_bigger_max_qty Boolean
    compute='_compute_is_qty_bigger_max_qty' string='Qty > max Qty'
  • is_qty_less_min_qty Boolean
    compute='_compute_is_qty_less_min_qty' string='Qty < Min Qty'
  • is_qty_not_multiple_qty Boolean
    compute='_compute_is_qty_not_multiple_qty' string='Not Multiple Qty'
  • sale_max_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') store=True string='Max Qty'
  • sale_min_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') store=True string='Min Qty'
  • sale_multiple_qty Float
    compute='_compute_sale_restricted_qty' digits=dp.get_precision('Product Unit of Measure') store=True string='Multiple Qty'
Public methods (1)
  • check_constraint_restricted_qty(self)
    @api.constrains('product_uom_qty', 'sale_min_qty', 'sale_max_qty', 'sale_multiple_qty')
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[18.0][MIG][IMP] sale_restricted_qty (#3959)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG] sale_restricted_qty (#4154)