Metadata-Version: 2.1
Name: odoo-addon-stock_move_not_merge_by_dest_moves
Version: 16.0.1.0.1
Summary: Do not merge stock moves that go to different destination moves
Home-page: https://github.com/OCA/stock-logistics-workflow
Author: Moduon, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
License: LGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 16.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.10
Requires-Dist: odoo<16.1dev,>=16.0a

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

==============================================
Stock Move - Do not merge by destination moves
==============================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
    :target: https://odoo-community.org/page/development-status
    :alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-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/16.0/stock_move_not_merge_by_dest_moves
    :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-16-0/stock-logistics-workflow-16-0-stock_move_not_merge_by_dest_moves
    :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=16.0
    :alt: Try me on Runboat

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

This module extends the functionality of stock move merging to allow you
to never merge stock moves if those moves will go to different
destination moves.

.. IMPORTANT::
   This is an alpha version, the data model and design can change at any time without warning.
   Only for development or testing purpose, do not use in production.
   `More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

This module was developed because sometimes we don't want our stock
movements to be merged if goes to different moves because:

- Sale free products that must be invoiced separatelly (for example, get
  2 + 1 free)
- Use warehouse with 2 or 3 steps in Outgoing Shipments
- Use products with Invoicing Policy: Delivered Quantities

All of these conditions must be met for this module to be really useful.

Use case example:
-----------------

We have an order with two lines of the same product that need to be
weighed (kg) and the offer is "get 2 + 1 free".

Each piece of Fish measures aproximately 1kg and we assume you know how
many Fishes you need to take.

The lines of the sale would be like this:

- 2 pieces of Fish for aproximately 2kg in total.
- 1 piece of Fish for aproximately 1kg in total with 100% discount.

Odoo Core VS. Module: Workflow comparison
-----------------------------------------

+----------------------------------+----------------------------------+
| **Odoo Core**                    | **With this module**             |
+==================================+==================================+
| The OUT step will not be         | The OUT step will not be         |
| grouped, so we will have 2       | grouped, so we will have 2       |
| moves.                           | moves.                           |
+----------------------------------+----------------------------------+
|                                  |                                  |
+----------------------------------+----------------------------------+
| The PICK step will be grouped    | Since we have 2 separate moves   |
| into one line, telling you that  | on the OUT step, we don't want   |
| 3 kgs must be demanded           | to merge moves in the PICK step. |
|                                  | PICK step will tell you that     |
|                                  | 3kgs must be demanded into 2     |
|                                  | separate moves.                  |
+----------------------------------+----------------------------------+
|                                  |                                  |
+----------------------------------+----------------------------------+
| When you measure the 3 fishes in | When you measure the 3 fishes in |
| the PICK step, we get 1.9kg for  | the PICK step, we get 1.9kg for  |
| the 2 Fishes and 0.7kg for the   | the 2 Fishes and 0.7kg for the   |
| free Fish. 2.6kg in total.       | free Fish. 2.6kg in total.       |
+----------------------------------+----------------------------------+
|                                  |                                  |
+----------------------------------+----------------------------------+
| Confirm the PICK step. When you  | Confirm the PICK step. When you  |
| reserve quantities on OUTGOING   | reserve quantities on OUTGOING   |
| step, 2kg will go to the 2       | step, 1.9kg will go to the 2     |
| Fishes and 0.6kg to the free     | Fishes and 0.7kg to the free     |
| Fish.                            | Fish.                            |
+----------------------------------+----------------------------------+
|                                  |                                  |
+----------------------------------+----------------------------------+
| Your invoice to the customer     | Your invoice to the customer     |
| will be 2kg for the 2 pieces and | will be 1.9kg for the 2 pieces   |
| 0.6kg for the free fish.         | and 0.7kg for the free fish.     |
+----------------------------------+----------------------------------+
|                                  |                                  |
+----------------------------------+----------------------------------+
| This is not correct: The 2 pices | This is correct                  |
| of Fish should be invoiced for   |                                  |
| 1.9kg and the free fish should   |                                  |
| be invoiced for 0.7kg at 100%    |                                  |
| discount.                        |                                  |
+----------------------------------+----------------------------------+

If you also don't want to have to reweigh in the last step if you
exceeded the quantity demanded (Fishes weight 1.14kg each for example),
you might be interested in this module:

- stock_rule_reserve_max_quantity

Usage
=====

To use this module, you need to have activated sales module:

1. Activate sale module.
2. Go to Warehouse and activate 2 steps shipping process.
3. Create and confirm a sale with 2 lines: One with discount and one
   without discount with the same product.
4. Confirm the sale.
5. Check the first picking (PICK) moves is not grouped.
6. Set quantity done on each line that differs (below) the reserved
   quantity on PICK picking and confirm it.
7. Go to the OUT picking, and check how quantities are distributed
   correctly.

Known issues / Roadmap
======================

- Receipts (second step quantities not correct)

  Symptom: After testing receipts, the quantities shown/propagated in
  the second step are not correct (they do not match what was processed
  in the first step, or the distribution per move is inconsistent).

  Source: Video “Moduon - Review Gelo [16.0][ADD]
  stock_move_not_merge_by_dest_moves #2014”.
  https://www.loom.com/share/416b1efb65d04c5d80acd9fac2bf4e0f?sid=8084079a-d28b-4b04-9839-cf3544cddc42

  Expected: The second-step document should reflect the quantities done
  in the first step, line by line / per destination move, without over-
  or under-allocation. Actual: The second-step quantities differ from
  the first step and/or are misallocated. Status: Under investigation.

- Sales (SO line changes not updated on picking)

  Symptom: After confirming a Sales Order, changes made on the SO line
  are not propagated to the generated picking.

  Source: Video “Moduon - Review Gelo [16.0][ADD]
  stock_move_not_merge_by_dest_moves #2014 sales”.
  https://www.loom.com/share/8dfe51327d6d435f8dbdcef4af9ce77b?sid=424232ef-c392-4903-8d42-0254da24c812

  Expected: Updates on the SO line (e.g., quantity/discount that affect
  downstream moves) should be reflected on the generated picking.
  Actual: The picking does not refresh after SO line changes. Status:
  Under investigation.

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_move_not_merge_by_dest_moves%0Aversion:%2016.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
-------

* Moduon

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

- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
- Rafael Blasco (`Moduon <https://www.moduon.team/>`__)

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

The development of this module has been financially supported by:

- Ulzama

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

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

|maintainer-Shide| |maintainer-rafaelbn| 

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

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