Skip to content

Commit

Permalink
[11.0][MIG] mrp_mto_with_stock
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavesh Odedra committed Mar 1, 2018
1 parent d8b0674 commit b686d2a
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 236 deletions.
4 changes: 3 additions & 1 deletion mrp_mto_with_stock/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ To configure this module, you need to:
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
Expand All @@ -44,7 +45,7 @@ To use this module, you need to:

.. 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/10.0
:target: https://runbot.odoo-community.org/runbot/129/11.0

Bug Tracker
===========
Expand All @@ -68,6 +69,7 @@ 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
----------
Expand Down
3 changes: 0 additions & 3 deletions mrp_mto_with_stock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
# 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).

from . import models
5 changes: 2 additions & 3 deletions mrp_mto_with_stock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# 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).
Expand All @@ -10,11 +9,11 @@
"author": "John Walsh, Eficent, Odoo Community Association (OCA)",
"website": "https://odoo-community.org/",
"category": "Manufacturing",
"version": "10.0.1.0.0",
"version": "11.0.1.0.0",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["mrp"],
"depends": ["stock", "sale", "purchase", "mrp"],
"data": [
'views/product_template_view.xml',
'views/stock_warehouse.xml',
Expand Down
239 changes: 117 additions & 122 deletions mrp_mto_with_stock/demo/product.xml
Original file line number Diff line number Diff line change
@@ -1,128 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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> <data 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>


</data> </odoo>
<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>
3 changes: 0 additions & 3 deletions mrp_mto_with_stock/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
# 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).

from . import mrp_production
Expand Down
Loading

0 comments on commit b686d2a

Please sign in to comment.