Metadata-Version: 2.1
Name: odoo-addon-sale_restricted_qty
Version: 18.0.2.0.1
Requires-Python: >=3.10
Requires-Dist: odoo==18.0.*
Summary: Sale order restricted quantity: min, max, multiple-of
Home-page: https://github.com/OCA/sale-workflow
License: AGPL-3
Author: Akretion, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

=====================================================
Sale order restricted quantity: min, max, multiple-of
=====================================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:bb9a60b339e3450b60352b20f55d8c24de811db0fc0e333e36e0935ab3ce9cbc
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
    :target: https://github.com/OCA/sale-workflow/tree/18.0/sale_restricted_qty
    :alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_restricted_qty
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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).

**Table of contents**

.. contents::
   :local:

Usage
=====

To set quantity constraints on a product: navigate to **Sales > Products
> Products**, open the product, and on the **Sales** tab in the **Qty
Constraints** section set corresponding values in the *Min Qty*, *Max
Qty*, or *Multiple-Of Qty* fields.

**Constraint Types:**

- **Min Qty**: Minimum quantity required for a sale.
- **Max Qty**: Maximum quantity allowed for a sale.
- **Multiple-Of Qty**: Quantity must be a multiple of this value.

**Enforcement Levels (Restrict):** For each constraint, you can choose
the enforcement level:

- **Blocking**: Strictly enforces the rule. The user cannot confirm the
  line with an invalid quantity.
- **Warning**: Displays a warning (yellow/orange indication) but allows
  the user to proceed.

  - *Use Case*: Use **Warning** when you want to allow flexibility, such
    as selling **samples** (below min qty) or clearing out **leftover
    stock** (remainder not matching multiple-of qty).

**Auto-Suggest:** When you select a product in a Sales Order line, if a
Minimum Quantity is strictly enforced (**Blocking**) and the current
quantity is not set (or is 0/1), the system will automatically populate
the quantity with the Minimum Quantity.

To set quantity constraints on a product variant: navigate to **Sales >
Products > Product Variants**, open the product variant, and on the
**Sales** tab in the **Qty Constraints** section set corresponding
values.

To set quantity constraints on a product category: navigate to **Sales >
Configuration > Product Categories**, open the product category, and in
the **Sales Qty Constraints** section set corresponding values.

The settings are inherited from the product category to the product, and
from the product to the product variant. To override the inherited
settings, check the checkbox next to the corresponding value and set the
value in the product or product variant.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_restricted_qty%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Mourad EL HADJ MIMOUN <mourad.elhadj.mimoune@akretion.com>
- `Ooops <https://www.ooops404.com/>`__:

  - Ashish Hirpara <https://ashish-hirpara.com>

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

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

- `CorporateHub <https://corporatehub.eu/>`__

  - Alexey Pelykh <alexey.pelykh@corphub.eu>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ashishhirapara| image:: https://github.com/ashishhirapara.png?size=40px
    :target: https://github.com/ashishhirapara
    :alt: ashishhirapara

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ashishhirapara| 

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_restricted_qty>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
