TIP: You can type at any time to perform a new search.
Sale order restricted quantity: min, max, multiple-of
sale_restricted_qty · OCA/sale-workflow
- Repository
- OCA/sale-workflow · module folder · Try on Runboat
- Module version
- 2.0.1
- Category
- Sales Management
- Folder size
- 0.39 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-07 08:42:48
- Authors
- Akretion, Odoo Community Association (OCA)
- Maintainers
- Akretion, Odoo Community Association (OCA)
- Committers
- sergiocorato, Weblate, OCA-git-bot, oca-ci, bosd
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
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).
Code Analysis ⓘ
Views touched (3)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_order_form |
sale.order | form | Inherits sale.view_order_form | |
view_product_category_form |
product.category | form | Inherits product.product_category_form_view | |
view_product_template_form |
product.template | form | Inherits product.product_template_form_view |
HTTP endpoints (0)
No HTTP endpoints found for this module.
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 (0)
No new fields.
Public methods (0)No public methods.
New fields (12)
-
is_above_max_qtyBooleancompute='_compute_restricted_qty_constraints' -
is_below_min_qtyBooleancompute='_compute_restricted_qty_constraints' -
is_max_qty_setBooleancompute='_compute_restricted_qty_from_product'store=True -
is_min_qty_setBooleancompute='_compute_restricted_qty_from_product'store=True -
is_multiple_of_qty_setBooleancompute='_compute_restricted_qty_from_product'store=True -
is_not_multiple_of_qtyBooleancompute='_compute_restricted_qty_constraints' -
max_qtyFloatcompute='_compute_restricted_qty_from_product'digits='Product Unit of Measure'help='The maximum quantity of product that can be sold.'store=True -
min_qtyFloatcompute='_compute_restricted_qty_from_product'digits='Product Unit of Measure'help='The minimum quantity of product that can be sold.'store=True -
multiple_of_qtyFloatcompute='_compute_restricted_qty_from_product'digits='Product Unit of Measure'help='The multiple-of quantity of product that can be sold.'store=Truestring='Multiple-Of Qty' -
restrict_max_qtyBooleancompute='_compute_restricted_qty_from_product'store=True -
restrict_min_qtyBooleancompute='_compute_restricted_qty_from_product'store=True -
restrict_multiple_of_qtyBooleancompute='_compute_restricted_qty_from_product'store=True
-
check_restricted_qty(self)@api.constrains('product_id', 'product_uom', 'product_uom_qty', 'is_min_qty_set', 'min_qty', 'restrict_min_qty', 'is_max_qty_set', 'max_qty', 'restrict_max_qty', 'is_multiple_of_qty_set', 'multiple_of_qty', 'restrict_multiple_of_qty')
New fields (36)
-
is_sale_inherited_max_qty_setBooleancompute='_compute_is_sale_inherited_max_qty_set'recursive=True -
is_sale_inherited_min_qty_setBooleancompute='_compute_is_sale_inherited_min_qty_set'recursive=True -
is_sale_inherited_multiple_of_qty_setBooleancompute='_compute_is_sale_inherited_multiple_of_qty_set'recursive=True -
is_sale_inherited_restrict_max_qty_setBooleancompute='_compute_is_sale_inherited_restrict_max_qty_set'recursive=True -
is_sale_inherited_restrict_min_qty_setBooleancompute='_compute_is_sale_inherited_restrict_min_qty_set'recursive=True -
is_sale_inherited_restrict_multiple_of_qty_setBooleancompute='_compute_is_sale_inherited_restrict_multiple_of_qty_set'recursive=True -
is_sale_max_qty_setBooleancompute='_compute_is_sale_max_qty_set'recursive=True -
is_sale_min_qty_setBooleancompute='_compute_is_sale_min_qty_set'recursive=True -
is_sale_multiple_of_qty_setBooleancompute='_compute_is_sale_multiple_of_qty_set'recursive=True -
is_sale_own_max_qty_setBoolean -
is_sale_own_min_qty_setBoolean -
is_sale_own_multiple_of_qty_setBoolean -
is_sale_own_restrict_max_qty_setBooleancompute='_compute_is_sale_own_restrict_max_qty_set'inverse='_inverse_is_sale_own_restrict_max_qty_set' -
is_sale_own_restrict_min_qty_setBooleancompute='_compute_is_sale_own_restrict_min_qty_set'inverse='_inverse_is_sale_own_restrict_min_qty_set' -
is_sale_own_restrict_multiple_of_qty_setBooleancompute='_compute_is_sale_own_restrict_multiple_of_qty_set'inverse='_inverse_is_sale_own_restrict_multiple_of_qty_set' -
is_sale_restrict_max_qty_setBooleancompute='_compute_is_sale_restrict_max_qty_set'recursive=True -
is_sale_restrict_min_qty_setBooleancompute='_compute_is_sale_restrict_min_qty_set'recursive=True -
is_sale_restrict_multiple_of_qty_setBooleancompute='_compute_is_sale_restrict_multiple_of_qty_set'recursive=True -
sale_inherited_max_qtyFloatcompute='_compute_sale_inherited_max_qty'digits='Product Unit of Measure'recursive=Truestore=True -
sale_inherited_min_qtyFloatcompute='_compute_sale_inherited_min_qty'digits='Product Unit of Measure'recursive=Truestore=True -
sale_inherited_multiple_of_qtyFloatcompute='_compute_sale_inherited_multiple_of_qty'digits='Product Unit of Measure'recursive=Truestore=True -
sale_inherited_restrict_max_qtySelectioncompute='_compute_sale_inherited_restrict_max_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True -
sale_inherited_restrict_min_qtySelectioncompute='_compute_sale_inherited_restrict_min_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True -
sale_inherited_restrict_multiple_of_qtySelectioncompute='_compute_sale_inherited_restrict_multiple_of_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True -
sale_max_qtyFloatcompute='_compute_sale_max_qty'digits='Product Unit of Measure'help='The maximum quantity of product that can be sold.'inverse='_inverse_sale_max_qty'recursive=Truestore=True -
sale_min_qtyFloatcompute='_compute_sale_min_qty'digits='Product Unit of Measure'help='The minimum quantity of product that can be sold.'inverse='_inverse_sale_min_qty'recursive=Truestore=True -
sale_multiple_of_qtyFloatcompute='_compute_sale_multiple_of_qty'digits='Product Unit of Measure'help='The multiple-of quantity of product that can be sold.'inverse='_inverse_sale_multiple_of_qty'recursive=Truestore=True -
sale_own_max_qtyFloatdigits='Product Unit of Measure' -
sale_own_min_qtyFloatdigits='Product Unit of Measure' -
sale_own_multiple_of_qtyFloatdigits='Product Unit of Measure' -
sale_own_restrict_max_qtySelectionselection=RESTRICTION_SELECTION -
sale_own_restrict_min_qtySelectionselection=RESTRICTION_SELECTION -
sale_own_restrict_multiple_of_qtySelectionselection=RESTRICTION_SELECTION -
sale_restrict_max_qtySelectioncompute='_compute_sale_restrict_max_qty'help="Decide if the maximum quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\nUse 'Warning' if you want to allow large orders that exceed strict policies under special conditions."inverse='_inverse_sale_restrict_max_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True -
sale_restrict_min_qtySelectioncompute='_compute_sale_restrict_min_qty'help="Decide if the minimum quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\nUse 'Warning' if you want to allow exceptions like selling samples or leftover stock."inverse='_inverse_sale_restrict_min_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True -
sale_restrict_multiple_of_qtySelectioncompute='_compute_sale_restrict_multiple_of_qty'help="Decide if the multiple-of quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\nUse 'Warning' to allow selling non-standard quantities for special cases like clearing leftover stock."inverse='_inverse_sale_restrict_multiple_of_qty'recursive=Trueselection=RESTRICTION_SELECTIONstore=True
No public methods.
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- green — ready to merge
- Open since
- 188 days ago
- Last activity
- 27 days ago
- Repository
- OCA/sale-workflow
- Pull request
- [19.0][MIG] sale_restricted_qty (#4154)