Sale order restricted quantity: min, max, multiple-of
sale_restricted_qty · OCA/sale-workflow
Health
80/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 4 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 5 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.4 MB
Module directory on disk
Code analysis
0 migration notes
5 models
3 views
0 HTTP endpoints
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).
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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…
Loading…