============================
Stock Picking Procure Method
============================

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

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

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

This module adds the possibility to set the supply method to *Apply Procurement
Rules* in the pickings, which is normally set to *Take From Stock* by default.

This way, you can configure MTO flows triggered from the picking itself.

**Table of contents**

.. contents::
   :local:

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

This module is useless without either Odoo's `mrp` or `purchase` modules (or
both). Depending on your needs you should install them in advance.

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

This is an example scenario with two warehouses. WH2 will be allways supplied
through WH1.

Common steps to `mrp` and `purchase` procurements:

#. Go to *Inventory > Configuration > Settings > Warehouse* and set *Multi-Step
   Routes* on.
#. Go to *Inventory > Configuration > Warehouse Management > Warehouses*
#. Create **WH1** with either *Manufacture to Resupply* or *Buy to
   Resupply* this warehouse or both set.
#. Create **WH2** setting off *Manufacture to Resupply* and *Buy to
   Resupply*. Set **WH1** as the *Resupply Warehouse*.
#. Go to *Inventory > Configuration > Warehouse Management > Routes* and click
   on the *Make To Order* one.
#. Add a new *Procurement Rule* with these settings and save:

   - Name: *WH1 -> WH2-MTO*
   - Action: *Pull From*
   - Operation Type: *WH1: Internal Transfers*
   - Source Location: *WH1/Stock*
   - Destination Location: *WH2/Stock*
   - Move Supply Method: *Take From Stock*
   - Propagation of Procurement Group: *Propagate*
   - Propagate cancel and split: `True`
   - Warehouse to Propagate: *WH1*

Now, if you want to trigger a manufacture:

   - Create a stockable product with a BoM list.
   - In the product's *Inventory > Routes section* set *Make To Order* and
     *Manufacture* on.

Or if you want to trigger a purchase:

   - Create a stockable product with a vendor.
   - In the product's *Inventory > Routes section* set *Make To Order* and
     *Purchase* on.

Usage
=====

After configuring you procurement rules and your product routes:

#. Go to *Inventory > Dashboard* and click on the *more options* icon (☰).
#. Choose *New > Planned Transfer*.
#. Set an origin and destination that is considered in the routes procurement
   rules.
#. Set *Supply Method* to *Apply Procurement Rules*.
#. Set the products and quantities you want to supply.
#. Save and click on *Mark as To Do*.
#. Depending on the product's supply type a new MO or a new PO should be
   created.

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

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

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

    * David Vidal
    * Pedro M. Baeza
    * César A. Sánchez

* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>

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/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_picking_procure_method>`_ project on GitHub.

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