Metadata-Version: 2.1
Name: odoo-addon-sale_order_line_multi_warehouse
Version: 17.0.1.0.0.3
Requires-Python: >=3.10
Requires-Dist: odoo>=17.0a,<17.1dev
Summary: Sale Order Line Multi Warehouse
Home-page: https://github.com/OCA/sale-workflow
License: AGPL-3
Author: Sygel, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 17.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

===============================
Sale Order Line Multi Warehouse
===============================

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

.. |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/17.0/sale_order_line_multi_warehouse
    :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-17-0/sale-workflow-17-0-sale_order_line_multi_warehouse
    :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=17.0
    :alt: Try me on Runboat

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

This module allows to select multiple warehouses in sale order lines so
the sale order is split into multiple pickings depending on the
warehouses selected in the lines.

**Table of contents**

.. contents::
   :local:

Installation
============

- Module sale_procurement_group_by_line should not be used along with
  this module as it provides the base to split sale order lines
  depending on different criteria, which might make
  sale_order_line_multi_warehouse module malfunction.

Configuration
=============

To activate the sale orders multi-warehouse options you need to:

1. Go to Inventory > Configuration > Settings.
2. Activate the "Multi Warehouse in Sale Orders" option, under the
   "Warehouse" section. This field is only visible for users in group
   "Inventory / Administrator". When a sale order is created, multi
   warehouse options in sale order lines will be enabled/disabled
   depending on the value in this field on creation.

It is necessary to set alternative warehouses to a warehouse so they can
be selected in sale order lines when the warehouse is set in the
"Warehouse" field in a sale order. To set alternative warehouses you
need to:

1. Go to Inventory > Configuration > Warehouses and see a warehouse's
   form view.
2. Select the warehouse's alternative warehouses in the "Altenative
   Warehouses" field. This field is only visible for users in group
   "Inventory / Administrator".

Usage
=====

- To split a sale order line into multiple warehouses you need to click
  on the tree graph icon in a sale order line. A popup will open, where
  warehouses and quantities can be selected. Only the warehouses set in
  the "Alternative Warehouses" field in the warehouse set in the sale
  order can be selected. Sale order line quantity and its warehouse
  distributions line quantities are synchronized as follows:

  - When quantity is increased in a sale order line:

    - In case there is a warehouse distribution line related to the
      warehouse set in the sale order, the increased quantity is added
      to the quantity in this warehouse distribution line.
    - In case there is not a warehouse distribution line related to the
      warehouse set in the sale order, a new warehouse distribution line
      related to the warehouse set in the sale order is created
      containing the increased amount.

  - When quantity is decreased in a sale order line:

    - In case there is a warehouse distribution line related to the
      warehouse set in the sale order, the decreased quantity is
      substracted from the quantity amount in this warehouse
      distribution line. When the amount set in this warehouse
      distribution line is not enough, the pending amount is randomly
      substracted from the rest of warehouse distribution lines.
    - In case there is not a warehouse distribution line related to the
      warehouse set in the sale order, the decreased quantity is
      randomly subsctracted from the available warehouse distribution
      lines.

  - When quantity is modified in a warehouse distribution line, the
    amount in the sale order line is automatically updated so it matches
    the total amount in the sale warehouse distribution lines.

- When the multi warehouse options in sale order lines are enabled,
  changing the general sale order warehouse needs to be done through a
  wizard, located in the "Other Info" tab, in the "Delivery" section.
  The button is only visible for users in group "Technical / Manage
  Multiple Warehouses".

- A sale order line cannot have multiple warehouse distribution lines
  related to the same warehouse.

- Once the sale order is validated, the order will be split into
  multiple pickings, one for each warehouse selected in the warehouse
  distribution lines.

- **IMPORTANT: In case this module is uninstalled, the warehouse
  distribution lines will be lost.**

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

- The warehouse distribution lines display could be improved in the
  future so it looks similar to the pop-up used for analytic
  distribution.

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_order_line_multi_warehouse%0Aversion:%2017.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
-------

* Sygel

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

- Manuel Regidor <manuel.regidor@sygel.es>
- Valentín Vinagre <valentin.vinagre@sygel.es>
- Edilio Escalona <e.escalona@binhex.cloud>

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.

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

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