======================================
Purchase and Subcontracting Management
======================================

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

.. |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-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%2Fmanufacture-lightgray.png?logo=github
    :target: https://github.com/OCA/manufacture/tree/14.0/mrp_subcontracting_purchase
    :alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_subcontracting_purchase
    :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/manufacture&target_branch=14.0
    :alt: Try me on Runboat

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

This bridge module adds some smart buttons between Purchase and
Subcontracting

**DISCLAIMER:** This module is a backport from Odoo SA and as such, it
is not included in the OCA CLA.

That means we do not have a copy of the copyright on it like all other
OCA modules.

This is a backporting of features from mrp_subcontracting modules from
v15 allowing to setup a flow addressing the following use case:

Vendor 1 manufactures and sells “Finished Product”

Vendor 2 manufactures and sells “Component Product” (used to manufacture
“Finished Product”)

Vendor 3 sells “Element Product” (used to manufacture “Component
Product”)

As an example, in the case where there is no available qty for each of
these three products, creating a PO purchasing “Finished product” for
Vendor 1 generates:

-  The standard receipt picking from Vendor 1 to our warehouse
-  A PO for Vendor 2 for product “Component Product”
-  A subcontracting order for Vendor 1 for “Finished Product”, with
   component location: Vendor 1 subcontracting location

Once this PO is confirmed, this generates:

-  A dropship picking for Vendor 1 from Vendor 2 for “Component Product”
-  A subcontracting order for Vendor 2 for “Component Product”, with
   component location: Vendor 2 subcontracting location
-  A PO for Vendor 3 for product “Element Product”

Once this PO is confirmed, this generates:

-  A dropship picking for Vendor 2 from Vendor 3 for “Element Product”

**Table of contents**

.. contents::
   :local:

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

-  Enable Multi-step Routes in Inventory > settings
-  Unarchive operation type “Subcontracting”

For each subcontracting partner:

-  Create a subcontracting location with parent location “Physical
   Locations/Subcontracting Location”
-  Set created location in subcontracting partner > tab Sales & Purchase
   > “Subcontracting location” field
-  Create two rules for Route “Dropship Subcontractor on Order:

   -  Action: Buy, Operation Type: Dropship, Destination location:
      partner subcontracting location
   -  Action: Pull From, Operation Type: Subcontracting, Source
      Location: partner subcontracting location, Destination location:
      Virtual Locations/Production, Supply Method: Trigger Another Rule,
      Partner Address: subcontracting partner

For each product:

-  Create a Vendor Pricelist and a Subcontracting BoM.
-  In Inventory tab, set Route “Buy” for Finished Product, and “Dropship
   Subcontractor on order” for products needed for its production.

Changelog
=========



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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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/manufacture/issues/new?body=module:%20mrp_subcontracting_purchase%0Aversion:%2014.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
-------

* Odoo S.A.
* Ooops
* Cetmix

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

-  Cetmix <@cetmix.com>
-  Ooops404 https://ooops404.com
-  Dessan Hemrayev dessanhemrayev@gmail.com
-  Maksim Shurupov geomer198@gmail.com

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

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

|maintainer-dessanhemrayev| |maintainer-CetmixGitDrone| |maintainer-Volodiay622| |maintainer-geomer198| 

This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/14.0/mrp_subcontracting_purchase>`_ project on GitHub.

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