Metadata-Version: 2.1
Name: odoo-addon-stock_picking_batch_creation
Version: 18.0.1.5.0
Requires-Python: >=3.10
Requires-Dist: odoo-addon-stock_picking_volume==18.0.*
Requires-Dist: odoo-addon-stock_split_picking_dimension==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Create a batch of pickings to be processed all together
Home-page: https://github.com/OCA/stock-logistics-workflow
License: AGPL-3
Author: ACSONE SA/NV,BCIM,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
Classifier: Development Status :: 4 - Beta
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

============================
Stock Picking Batch Creation
============================

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

.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github
    :target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_batch_creation
    :alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-stock_picking_batch_creation
    :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/stock-logistics-workflow&target_branch=18.0
    :alt: Try me on Runboat

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

Odoo allows you to create batches of pickings by hand or automatically
by specifying some criteria on the picking type definition.

The approach in this addon is slightly different. It doesn't depend on
the picking type and is triggered on demand by the user with the use of
a specialized wizard.

The creation of the batch is based on the following criteria:

- A list of picking types to consider
- A list of stock device types available to the operator to process the
  batch.
- A maximum number of lines in the batch

Stock device types
------------------

A stock device type is a new concept that allows to define a type of
device that can be used by an operator to process operations into the
warehouse (like a forklift, a compartmentalized trolleys, ...).

Depending on the device type, the resources available to complete the
job will be different. A this stage, 3 main criteria are considered:

- The maximum weight that can be handled by the device
- The maximum volume that can be handled by the device
- The number of bins/compartments available on the device

In addition to these criteria, 2 others criteria can be defined that
will be evaluated to select the appropriate device type at the start of
the batch creation process if more than one device type is available:

- A minimum picking volume to consider the device type,
- A sequence to define the order in which the device type will be
  considered.

**Table of contents**

.. contents::
   :local:

Usage
=====

First of all, you need to create your stock device type. To do so, go to
the *Inventory -> Configuration -> Stock Device Types* menu.

Once it's done, you can start creating your picking batches.

To launch the device, go to the *Inventory -> Operations -> Make Picking
Batch* menu.

The *Make Picking Batch* window will open and allows you to specify your
criteria for the batch creation. When all your criteria are set, click
on the *Create Batch Picking* and lets the magic happen. A new window
will open with the created batch picking.

Behind the scene
~~~~~~~~~~~~~~~~

The creation of the picking batch is done in 3 steps:

1. We search for a picking ready to be processed and that fits the
   criteria specified in the wizard.
2. We determine the device to use for this first picking.
3. While the defined limits are not reached, we look for one picking at
   a time that is ready to be processed and that fits the new criteria.
   The new criteria are computed at each loop iteration to take into
   account the pickings already into the batch.

When we look for a picking ready to be processed, we look for a picking
that is in state "Assigned" or "Partially Available" with a picking type
into the list of picking types defined in the wizard and not yet in a
batch.

At step 1, we add to theses conditions on the pickings, a list of
alternatives conditions to restrict the search to pickings that can be
handled by the device types defined in the wizard. (A first search is
done to try to find a picking for the given user and which is printed
and if not found, we search for pickings not linked to a user and which
are not printed).

At step2, since the first step will return a picking that can be handled
by any of the device types specified, we process the list of device one
by one in the order defined by the sequence field and we stop at the
first device that can handle the picking.

At step 3, now that we have a picking and a device, we have all the
information to refine the search for the next picking to the volume,
weight and number of lines remaining in the batch. While there are still
some bins available and in the batch and the search returns result, we
look for a picking that fits the updated criteria and update the
criteria at each loop iteration.

Advanced configuration
~~~~~~~~~~~~~~~~~~~~~~

Locking
^^^^^^^

You can choice on the wizard to apply a LOCK into the database for each
picking added to the batch. This is useful in a multi-user environment
with a lot of users that can trigger the creation of bach picking to
avoid problems of concurrency. If activated, picking already selected by
a concurrent process will be skipped.

Grouping by partner
^^^^^^^^^^^^^^^^^^^

If you want to allow to group pickings of the same partner into the same
bins, you can activate the option *Group by partner* on the wizard. This
will prevent to consume at least one bin for each picking if pickings
are for the same partner. When activated, the computation of the number
of bins consumed by the picking into the batch will take into account
the volume of the pickings for the same partners already.

Splitting picking if needed
^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can also activate the option *Split picking exceeding the limits* on
the wizard. In this case, when the system select the first picking to
add to the batch, it will disable the criteria based on the volume,
weight and number of lines. If the picking is exceeding the limits, the
system will then try to split the picking so that the new picking fits
the criteria and can be added to the batch. If the picking can't be
split, an exception will be raised.

This option is useful to allow to create a batch picking with pickings
that are exceeding the limits defined in the wizard. It also ensures
that the processing of pickings is done in the order of the pickings. If
the option is not activated, the system will try to find a picking that
fits the criteria and will ignore those that are exceeding the limits
even if they are to be processed first.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-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/stock-logistics-workflow/issues/new?body=module:%20stock_picking_batch_creation%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
-------

* ACSONE SA/NV
* BCIM

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

- Laurent Mignon <laurent.mignon@acsone.eu> (https://www.acsone.eu/)
- Lindsay Marion <lindsay.marion@acsone.eu> (https://www.acsone.eu/)
- Denis Roussel <denis.roussel@acsone.eu> (https://www.acsone.eu/)
- Jacques-Etienne Baudoux (BCIM) <je@bcim.be>

Other credits
-------------

The development of this module has been financially supported by:

- ACSONE SA/NV
- Alcyon Belux

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-lmignon| image:: https://github.com/lmignon.png?size=40px
    :target: https://github.com/lmignon
    :alt: lmignon
.. |maintainer-jbaudoux| image:: https://github.com/jbaudoux.png?size=40px
    :target: https://github.com/jbaudoux
    :alt: jbaudoux

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

|maintainer-lmignon| |maintainer-jbaudoux| 

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

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