Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.0][MIG] mrp_mto_with_stock #255

Merged
merged 11 commits into from
Apr 10, 2018
Merged
87 changes: 87 additions & 0 deletions mrp_mto_with_stock/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==================
MRP MTO with Stock
==================

This module extends the functionality of Manufacturing to support the creation
of procurements only for a part of the raw material.
It has 2 modes. The default one allow you to pull
from stock until the quantity on hand is zero, and then create a procurement
to fulfill the MO requirements. In this mode, the created procurements must
be the ones fulfilling the MO that has generated it.
The other mode is based on the forecast quantity. It will allow to pull from
stock until the forecast quantity is zero and then create a procurement for
the missing products. In this mode, there is no link between the procurement
created and MO that has generated it. The procurement may be used to fulfill
another MO.

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

To configure this module, you need to:

#. Go to the products you want to follow this behaviour.
#. In the view form go to the tab *Inventory* and set the *Manufacturing
MTO/MTS Locations*. Any other location not specified here will have the
standard behavior.

If you want to use the second mode, based on forecast quantity

#. Go to the warehouse you want to follow this behaviour.
#. In the view form go to the tab *Warehouse Configuration* and set the
*MRP MTO with forecast stock*. You still need to configure the products
like described in last step.

Usage
=====

To use this module, you need to:

#. Go to *Manufacturing* and create a Manufacturing Order.
#. Click on *Check availability*.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/129/11.0

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 smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

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

* John Walsh <John.Walsh@interclean.com>
* Lois Rilo <lois.rilo@eficent.com>
* Florian da Costa <florian.dacosta@akretion.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
3 changes: 3 additions & 0 deletions mrp_mto_with_stock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
22 changes: 22 additions & 0 deletions mrp_mto_with_stock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2015 John Walsh
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "MRP MTO with Stock",
"summary": "Fix Manufacturing orders to pull from stock until qty is "
"zero, and then create a procurement for them.",
"author": "John Walsh, Eficent, Odoo Community Association (OCA)",
"website": "https://odoo-community.org/",
"category": "Manufacturing",
"version": "11.0.1.0.0",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["stock", "sale", "purchase", "mrp"],
"data": [
'views/product_template_view.xml',
'views/stock_warehouse.xml',
],
"demo": ['demo/product.xml'],
}
123 changes: 123 additions & 0 deletions mrp_mto_with_stock/demo/product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo noupdate="1">
<record id="product_product_manufacture_1" model="product.product">
<field name="name">TOP</field>
<field name="categ_id" ref="product.product_category_3"/>
<field name="standard_price">600.00</field>
<field name="list_price">400.00</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="description">TODO</field>
<field name="default_code">MANUF</field>
<field name="route_ids" eval="[(6, 0, [ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')])]"/>
</record>

<record id="product_product_manufacture_1_1" model="product.product">
<field name="name">Subproduct 1</field>
<field name="categ_id" ref="product.product_category_3"/>
<field name="standard_price">300.00</field>
<field name="list_price">100.00</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="description">TODO</field>
<field name="default_code">MANUF 1-1</field>
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
<field name="mrp_mts_mto_location_ids" eval="[(6, 0, [ref('stock.stock_location_stock')])]"/>
</record>

<record id="product_product_manufacture_1_2" model="product.product">
<field name="name">Subproduct 2</field>
<field name="categ_id" ref="product.product_category_3"/>
<field name="standard_price">100.00</field>
<field name="list_price">30.00</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="description">TODO</field>
<field name="default_code">MANUF 1-2</field>
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
<field name="mrp_mts_mto_location_ids" eval="[(6, 0, [ref('stock.stock_location_stock')])]"/>
</record>

<record id="product_product_manufacture_1_1_1" model="product.product">
<field name="name">Subproduct 1-1</field>
<field name="categ_id" ref="product.product_category_3"/>
<field name="standard_price">10.00</field>
<field name="list_price">3.00</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="description">TODO</field>
<field name="default_code">MANUF 1-1-1</field>
</record>

<record id="product_product_manufacture_1_2_1" model="product.product">
<field name="name">Subproduct 2-1</field>
<field name="categ_id" ref="product.product_category_3"/>
<field name="standard_price">10.00</field>
<field name="list_price">3.00</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="description">TODO</field>
<field name="default_code">MANUF 1-2-1</field>
</record>

<record id="mrp_bom_manuf_1" model="mrp.bom">
<field name="product_tmpl_id" ref="product_product_manufacture_1_product_template"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>

<record id="mrp_bom_line_manuf_1_1" model="mrp.bom.line">
<field name="product_id" ref="product_product_manufacture_1_1"/>
<field name="product_qty">5</field>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_manuf_1"/>
</record>

<record id="mrp_bom_line_manuf_1_2" model="mrp.bom.line">
<field name="product_id" ref="product_product_manufacture_1_2"/>
<field name="product_qty">2</field>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_manuf_1"/>
</record>

<record id="mrp_bom_manuf_1_1" model="mrp.bom">
<field name="product_tmpl_id" ref="product_product_manufacture_1_1_product_template"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>

<record id="mrp_bom_line_manuf_1_1_1" model="mrp.bom.line">
<field name="product_id" ref="product_product_manufacture_1_1_1"/>
<field name="product_qty">2</field>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_manuf_1_1"/>
</record>

<record id="mrp_bom_manuf_1_2" model="mrp.bom">
<field name="product_tmpl_id" ref="product_product_manufacture_1_2_product_template"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>

<record id="mrp_bom_line_manuf_1_2_1" model="mrp.bom.line">
<field name="product_id" ref="product_product_manufacture_1_2_1"/>
<field name="product_qty">4</field>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_manuf_1_2"/>
</record>
</odoo>
106 changes: 106 additions & 0 deletions mrp_mto_with_stock/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_mto_with_stock
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-28 03:44+0000\n"
"PO-Revision-Date: 2017-11-28 03:44+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: mrp_mto_with_stock
#: model:ir.model.fields,field_description:mrp_mto_with_stock.field_stock_warehouse_mrp_mto_mts_forecast_qty
msgid "MRP MTO with forecast stock"
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model.fields,field_description:mrp_mto_with_stock.field_product_product_mrp_mts_mto_location_ids
#: model:ir.model.fields,field_description:mrp_mto_with_stock.field_product_template_mrp_mts_mto_location_ids
msgid "Manufacturing MTO/MTS Locations"
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model,name:mrp_mto_with_stock.model_mrp_production
msgid "Manufacturing Order"
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model,name:mrp_mto_with_stock.model_product_template
msgid "Product Template"
msgstr "Plantilla del producte"

#. module: mrp_mto_with_stock
#: model:product.product,name:mrp_mto_with_stock.product_product_manufacture_1_1
#: model:product.template,name:mrp_mto_with_stock.product_product_manufacture_1_1_product_template
msgid "Subproduct 1"
msgstr ""

#. module: mrp_mto_with_stock
#: model:product.product,name:mrp_mto_with_stock.product_product_manufacture_1_1_1
#: model:product.template,name:mrp_mto_with_stock.product_product_manufacture_1_1_1_product_template
msgid "Subproduct 1-1"
msgstr ""

#. module: mrp_mto_with_stock
#: model:product.product,name:mrp_mto_with_stock.product_product_manufacture_1_2
#: model:product.template,name:mrp_mto_with_stock.product_product_manufacture_1_2_product_template
msgid "Subproduct 2"
msgstr ""

#. module: mrp_mto_with_stock
#: model:product.product,name:mrp_mto_with_stock.product_product_manufacture_1_2_1
#: model:product.template,name:mrp_mto_with_stock.product_product_manufacture_1_2_1_product_template
msgid "Subproduct 2-1"
msgstr ""

#. module: mrp_mto_with_stock
#: model:product.product,description:mrp_mto_with_stock.product_product_manufacture_1
#: model:product.product,description:mrp_mto_with_stock.product_product_manufacture_1_1
#: model:product.product,description:mrp_mto_with_stock.product_product_manufacture_1_1_1
#: model:product.product,description:mrp_mto_with_stock.product_product_manufacture_1_2
#: model:product.product,description:mrp_mto_with_stock.product_product_manufacture_1_2_1
#: model:product.template,description:mrp_mto_with_stock.product_product_manufacture_1_1_1_product_template
#: model:product.template,description:mrp_mto_with_stock.product_product_manufacture_1_1_product_template
#: model:product.template,description:mrp_mto_with_stock.product_product_manufacture_1_2_1_product_template
#: model:product.template,description:mrp_mto_with_stock.product_product_manufacture_1_2_product_template
#: model:product.template,description:mrp_mto_with_stock.product_product_manufacture_1_product_template
msgid "TODO"
msgstr ""

#. module: mrp_mto_with_stock
#: model:product.product,name:mrp_mto_with_stock.product_product_manufacture_1
#: model:product.template,name:mrp_mto_with_stock.product_product_manufacture_1_product_template
msgid "TOP"
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model.fields,help:mrp_mto_with_stock.field_product_product_mrp_mts_mto_location_ids
#: model:ir.model.fields,help:mrp_mto_with_stock.field_product_template_mrp_mts_mto_location_ids
msgid ""
"These manufacturing locations will create procurements when there is no "
"stock availale in the source location."
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model,name:mrp_mto_with_stock.model_stock_warehouse
msgid "Warehouse"
msgstr ""

#. module: mrp_mto_with_stock
#: model:ir.model.fields,help:mrp_mto_with_stock.field_stock_warehouse_mrp_mto_mts_forecast_qty
msgid ""
"When you use Mrp_mto_with_stock, the procurement creation is based on "
"reservable stock by default. Check this option if you prefer base it on the "
"forecast stock. In this case, the created procurements won't be linked to "
"the raw material moves"
msgstr ""
Loading