Skip to content

Commit c011775

Browse files
committed
[MIG] sale_restricted_qty: Migration to 19.0
1 parent 384aa38 commit c011775

34 files changed

+3647
-1848
lines changed

sale_restricted_qty/README.rst

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
:target: https://odoo-community.org/get-involved?utm_source=readme
33
:alt: Odoo Community Association
44

5-
=======================
6-
Sale order min quantity
7-
=======================
5+
=====================================================
6+
Sale order restricted quantity: min, max, multiple-of
7+
=====================================================
88

99
..
1010
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1111
!! This file is generated by oca-gen-addon-readme !!
1212
!! changes will be overwritten. !!
1313
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14-
!! source digest: sha256:11c109b03c7404989c3814a5675fcc5ae0cb3088674059b409bc202355156177
14+
!! source digest: sha256:1c96b9ab4a5f52f04233a4d0d47e6c5b19d7871794cec15c15d9a8821109c2dc
1515
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1616
1717
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -32,16 +32,10 @@ Sale order min quantity
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
3434

35-
This module allows to define min, max and multiple order quantity on
36-
product. Min and Max order quantity is either required or recommanded.
37-
If you check "Force mini/max Qty" on product the min/max qty do not
38-
block sale order. This can be used if the available stock is less then
39-
the min qty or if you want to sell sample products. Max qty can be used
40-
if we dont want to sale more than available qty (end of series product)
41-
42-
Setings are defined on product, if values are not set we use settings
43-
from product template. If settings are not set on product template we
44-
use settings from product category otherwise parent category.
35+
This module allows to set mininal, maximal, and multiple-of quantity
36+
constraints on product categories and products, and to check and
37+
optionally enforce these constraints on sale orders (either as strict
38+
blocking or soft warnings).
4539

4640
**Table of contents**
4741

@@ -51,16 +45,47 @@ use settings from product category otherwise parent category.
5145
Usage
5246
=====
5347

54-
1. | Go to **Sales > Products > Product Variants** and Set "Min Sale
55-
Qty".
56-
| If you dont want block product sale if qty is less the "Min Sale
57-
Qty", chek "Force Min Qty"
48+
To set quantity constraints on a product: navigate to **Sales > Products
49+
> Products**, open the product, and on the **Sales** tab in the **Qty
50+
Constraints** section set corresponding values in the *Min Qty*, *Max
51+
Qty*, or *Multiple-Of Qty* fields.
52+
53+
**Constraint Types:**
54+
55+
- **Min Qty**: Minimum quantity required for a sale.
56+
- **Max Qty**: Maximum quantity allowed for a sale.
57+
- **Multiple-Of Qty**: Quantity must be a multiple of this value.
58+
59+
**Enforcement Levels (Restrict):** For each constraint, you can choose
60+
the enforcement level:
61+
62+
- **Blocking**: Strictly enforces the rule. The user cannot confirm the
63+
line with an invalid quantity.
64+
- **Warning**: Displays a warning (yellow/orange indication) but allows
65+
the user to proceed.
66+
67+
- *Use Case*: Use **Warning** when you want to allow flexibility, such
68+
as selling **samples** (below min qty) or clearing out **leftover
69+
stock** (remainder not matching multiple-of qty).
70+
71+
**Auto-Suggest:** When you select a product in a Sales Order line, if a
72+
Minimum Quantity is strictly enforced (**Blocking**) and the current
73+
quantity is not set (or is 0/1), the system will automatically populate
74+
the quantity with the Minimum Quantity.
5875

59-
2. | Create a sale order and add a sale order line with this product and
60-
check
61-
| if Qty is less then "Min Qty" A message in displayed "Min Qty
62-
Required" Or "Min Qty Recommanded". Check if Min qty is required
63-
you can't validate order.
76+
To set quantity constraints on a product variant: navigate to **Sales >
77+
Products > Product Variants**, open the product variant, and on the
78+
**Sales** tab in the **Qty Constraints** section set corresponding
79+
values.
80+
81+
To set quantity constraints on a product category: navigate to **Sales >
82+
Configuration > Product Categories**, open the product category, and in
83+
the **Sales Qty Constraints** section set corresponding values.
84+
85+
The settings are inherited from the product category to the product, and
86+
from the product to the product variant. To override the inherited
87+
settings, check the checkbox next to the corresponding value and set the
88+
value in the product or product variant.
6489

6590
Bug Tracker
6691
===========
@@ -86,13 +111,20 @@ Contributors
86111
- Mourad EL HADJ MIMOUN <mourad.elhadj.mimoune@akretion.com>
87112
- `Ooops <https://www.ooops404.com/>`__:
88113

89-
- Ashish Hirpara
90-
<`https://ashish-hirpara.com\\> <https://ashish-hirpara.com\>>`__
114+
- Ashish Hirpara <https://ashish-hirpara.com>
91115

92116
- `Aion Tech <https://aiontech.company/>`__:
93117

94118
- Simone Rubino <simone.rubino@aion-tech.it>
95119

120+
- `CorporateHub <https://corporatehub.eu/>`__
121+
122+
- Alexey Pelykh <alexey.pelykh@corphub.eu>
123+
124+
- `Apik <https://apik.cloud/>`__
125+
126+
- Thomas HERBIN <the@apik.cloud>
127+
96128
Maintainers
97129
-----------
98130

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Copyright 2019 Akretion (<http://www.akretion.com>)
22
# Copyright 2023 Simone Rubino - Aion Tech
3+
# Copyright 2024 CorporateHub
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
45

56
{
6-
"name": "Sale order min quantity",
7-
"version": "16.0.1.0.0",
7+
"name": "Sale order restricted quantity: min, max, multiple-of",
8+
"version": "19.0.1.0.0",
89
"category": "Sales Management",
910
"author": "Akretion, Odoo Community Association (OCA)",
1011
"contributors": ["Ashish Hirpara"],
@@ -15,8 +16,7 @@
1516
"data": [
1617
"views/product_category_views.xml",
1718
"views/product_template_views.xml",
18-
"views/product_product_views.xml",
19-
"views/sale_views.xml",
19+
"views/sale_order_views.xml",
2020
],
2121
"installable": True,
2222
}

sale_restricted_qty/i18n/de.po

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_restricted_qty
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2025-03-03 12:00+0000\n"
10+
"Last-Translator: \n"
11+
"Language-Team: \n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
18+
#. module: sale_restricted_qty
19+
msgid "%(order_name)s - Product \"%(product_name)s\": %(failed_constraints)s"
20+
msgstr "%(order_name)s - Produkt \"%(product_name)s\": %(failed_constraints)s"
21+
22+
#. module: sale_restricted_qty
23+
msgid "Blocking"
24+
msgstr "Sperrend"
25+
26+
#. module: sale_restricted_qty
27+
msgid "Check quantity for these products:\n"
28+
msgstr "Prüfen Sie die Menge für diese Produkte:\n"
29+
30+
#. module: sale_restricted_qty
31+
msgid ""
32+
"Decide if the maximum quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\n"
33+
"Use 'Warning' if you want to allow large orders that exceed strict policies under special conditions."
34+
msgstr ""
35+
36+
#. module: sale_restricted_qty
37+
msgid ""
38+
"Decide if the minimum quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\n"
39+
"Use 'Warning' if you want to allow exceptions like selling samples or leftover stock."
40+
msgstr ""
41+
42+
#. module: sale_restricted_qty
43+
msgid ""
44+
"Decide if the multiple-of quantity constraint is strictly enforced (Blocking) or if it only triggers a warning (Warning).\n"
45+
"Use 'Warning' to allow selling non-standard quantities for special cases like clearing leftover stock."
46+
msgstr ""
47+
48+
#. module: sale_restricted_qty
49+
msgid "Max Qty"
50+
msgstr ""
51+
52+
#. module: sale_restricted_qty
53+
msgid "Max Quantity Exceeded"
54+
msgstr ""
55+
56+
#. module: sale_restricted_qty
57+
msgid "Max Quantity Recommended"
58+
msgstr ""
59+
60+
#. module: sale_restricted_qty
61+
msgid "Min Qty"
62+
msgstr ""
63+
64+
#. module: sale_restricted_qty
65+
msgid "Min Quantity Recommended"
66+
msgstr ""
67+
68+
#. module: sale_restricted_qty
69+
msgid "Min Quantity Required"
70+
msgstr ""
71+
72+
#. module: sale_restricted_qty
73+
msgid "Multiple Quantity Required"
74+
msgstr ""
75+
76+
#. module: sale_restricted_qty
77+
msgid "Multiple-Of Qty"
78+
msgstr ""
79+
80+
#. module: sale_restricted_qty
81+
msgid "Restrict"
82+
msgstr ""
83+
84+
#. module: sale_restricted_qty
85+
msgid "Sale Max qty"
86+
msgstr ""
87+
88+
#. module: sale_restricted_qty
89+
msgid "Sale Miltiple qty"
90+
msgstr ""
91+
92+
#. module: sale_restricted_qty
93+
msgid "Sale Min qty"
94+
msgstr ""
95+
96+
#. module: sale_restricted_qty
97+
msgid "Sale Restricted Qty"
98+
msgstr ""
99+
100+
#. module: sale_restricted_qty
101+
msgid "Sale restricted qty"
102+
msgstr ""
103+
104+
#. module: sale_restricted_qty
105+
msgid "The maximum quantity of product that can be sold."
106+
msgstr ""
107+
108+
#. module: sale_restricted_qty
109+
msgid "The minimum quantity of product that can be sold."
110+
msgstr ""
111+
112+
#. module: sale_restricted_qty
113+
msgid "The multiple-of quantity of product that can be sold."
114+
msgstr ""
115+
116+
#. module: sale_restricted_qty
117+
msgid "Value"
118+
msgstr ""
119+
120+
#. module: sale_restricted_qty
121+
msgid "Warning"
122+
msgstr "Warnung"
123+
124+
#. module: sale_restricted_qty
125+
msgid "maximal quantity is %(max_qty)s"
126+
msgstr "Höchstmenge ist %(max_qty)s"
127+
128+
#. module: sale_restricted_qty
129+
msgid "minimal quantity is %(min_qty)s"
130+
msgstr "Mindestmenge ist %(min_qty)s"
131+
132+
#. module: sale_restricted_qty
133+
msgid "quantity should be multiple of %(multiple_of_qty)s"
134+
msgstr "Menge sollte ein Vielfaches von %(multiple_of_qty)s sein"

0 commit comments

Comments
 (0)