Skip to content

Commit

Permalink
Merge 4e4351b into c4fc1b2
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-filament committed Apr 25, 2019
2 parents c4fc1b2 + 4e4351b commit 17d1e6d
Show file tree
Hide file tree
Showing 30 changed files with 1,505 additions and 0 deletions.
230 changes: 230 additions & 0 deletions mrp_subcontracting/LICENSE

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions mrp_subcontracting/README.rst
@@ -0,0 +1,21 @@
**This file is going to be generated by oca-gen-addon-readme.**

*Manual changes will be overwritten.*

Please provide content in the ``readme`` directory:

* **DESCRIPTION.rst** (required)
* INSTALL.rst (optional)
* CONFIGURE.rst (optional)
* **USAGE.rst** (optional, highly recommended)
* DEVELOP.rst (optional)
* ROADMAP.rst (optional)
* HISTORY.rst (optional, recommended)
* **CONTRIBUTORS.rst** (optional, highly recommended)
* CREDITS.rst (optional)

Content of this README will also be drawn from the addon manifest,
from keys such as name, authors, maintainers, development_status,
and license.

A good, one sentence summary in the manifest is also highly recommended.
4 changes: 4 additions & 0 deletions mrp_subcontracting/__init__.py
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizard
33 changes: 33 additions & 0 deletions mrp_subcontracting/__manifest__.py
@@ -0,0 +1,33 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "MRP Subcontracting",
"summary": "Manufacturing subcontracting flow",
"version": "12.0.1.0.0",
"development_status": "Production",
"category": 'Manufacturing',
"website": "https://github.com/OCA/manufacture",
"author": "Scopea, Le Filament, Odoo Community Association (OCA)",
"maintainers": ["remi-filament", ],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
'purchase_mrp',
],
"data": [
'data/location.xml',
'data/picking_type.xml',
'views/res_partner_view.xml',
'views/product_template_view.xml',
'views/product_supplierinfo_view.xml',
'views/mrp_production_view.xml',
'wizard/mrp_subcontract_view.xml',
],
"demo": [
"demo/demo_res_partner.xml",
"demo/demo_product.xml",
"demo/demo_mrp_workcenter.xml",
"demo/demo_mrp_routing.xml",
"demo/demo_mrp_bom.xml",
],
}
10 changes: 10 additions & 0 deletions mrp_subcontracting/data/location.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>

<odoo>
<record id="stock_location_subcontractor" model="stock.location">
<field name="name">Subcontractors</field>
<field name="location_id" ref="stock.stock_location_customers"/>
<field name="usage">internal</field>
<field name="company_id"></field>
</record>
</odoo>
55 changes: 55 additions & 0 deletions mrp_subcontracting/data/picking_type.xml
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="sequence_stock_sub_delivery" model="ir.sequence">
<field name="name">Subcontractor sequence out</field>
<field name="prefix">SD</field>
<field name="padding">5</field>
<field name="number_increment">1</field>
</record>

<record id="sequence_stock_sub_receipt" model="ir.sequence">
<field name="name">Subcontractor sequence in</field>
<field name="prefix">SR</field>
<field name="padding">5</field>
<field name="number_increment">1</field>
</record>

<record id="sequence_stock_sub_dropship" model="ir.sequence">
<field name="name">Subcontractor sequence dropship</field>
<field name="prefix">SDS</field>
<field name="padding">5</field>
<field name="number_increment">1</field>
</record>
</data>

<data noupdate="0">
<record id="picking_type_delivery_subcontracting" model="stock.picking.type">
<field name="name">Delivery to Subcontractors</field>
<field name="sequence_id" ref="sequence_stock_sub_delivery"/>
<field name="default_location_src_id" ref="stock.stock_location_stock"/>
<field name="default_location_dest_id" ref="stock_location_subcontractor"/>
<field name="warehouse_id" ref="stock.warehouse0"/>
<field name="code">outgoing</field>
</record>

<record id="picking_type_receipt_subcontracting" model="stock.picking.type">
<field name="name">Receipts from Subcontractors</field>
<field name="sequence_id" ref="sequence_stock_sub_receipt"/>
<field name="default_location_dest_id" ref="stock.stock_location_stock"/>
<field name="default_location_src_id" ref="stock_location_subcontractor"/>
<field name="warehouse_id" ref="stock.warehouse0"/>
<field name="code">incoming</field>
</record>

<record id="picking_type_dropship_subcontracting" model="stock.picking.type">
<field name="name">Dropship to Subcontractors</field>
<field name="sequence_id" ref="sequence_stock_sub_dropship"/>
<field name="default_location_dest_id" ref="stock_location_subcontractor"/>
<field name="default_location_src_id" ref="stock_location_subcontractor"/>
<field name="warehouse_id" eval="False"/>
<field name="code">incoming</field>
</record>
</data>

</odoo>
103 changes: 103 additions & 0 deletions mrp_subcontracting/demo/demo_mrp_bom.xml
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright 2019 Le Filament (<http://www.le-filament.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo>
<data noupdate="1">
<!-- Semi-Finished product BOM no route-->
<record id="bom_semi_finished_no_route" model="mrp.bom">
<field name="product_tmpl_id" ref="mrp_subcontracting.semi_finished_product_template"/>
<field name="sequence">1</field>
<field name="code">no route</field>
</record>
<record id="bom_semi_finished_component_1_no_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_1"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_semi_finished_no_route"/>
</record>
<record id="bom_semi_finished_component_2_no_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_2"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_semi_finished_no_route"/>
</record>


<!-- Semi-Finished product BOM with Route -->
<record id="bom_semi_finished_route" model="mrp.bom">
<field name="product_tmpl_id" ref="mrp_subcontracting.semi_finished_product_template"/>
<field name="sequence">10</field>
<field name="code">with route</field>
<field name="routing_id" ref="mrp_subcontracting.routing_sfp"/>
</record>
<record id="bom_semi_finished_component_1_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_1"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_semi_finished_route"/>
<field name="operation_id" ref="mrp_subcontracting.routing_sfp_sanding"/>
</record>
<record id="bom_semi_finished_component_2_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_2"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_semi_finished_route"/>
<field name="operation_id" ref="mrp_subcontracting.routing_sfp_sanding"/>
</record>

<!-- Finished product BOM no route -->
<record id="bom_finished_no_route" model="mrp.bom">
<field name="product_tmpl_id" ref="mrp_subcontracting.finished_product_template"/>
<field name="sequence">1</field>
<field name="code">no route</field>
</record>
<record id="bom_finished_component_1_no_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.semi_finished"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_no_route"/>
</record>
<record id="bom_finished_component_2_no_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_3"/>
<field name="product_qty">2</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_no_route"/>
</record>

<!-- Finished product BOM with route 1 step -->
<record id="bom_finished_route" model="mrp.bom">
<field name="product_tmpl_id" ref="mrp_subcontracting.finished_product_template"/>
<field name="sequence">1</field>
<field name="code">with route 1 step</field>
<field name="routing_id" ref="mrp_subcontracting.routing_fp"/>
</record>
<record id="bom_finished_component_1_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.semi_finished"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_route"/>
<field name="operation_id" ref="mrp_subcontracting.routing_fp_painting"/>
</record>
<record id="bom_finished_component_2_route" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_3"/>
<field name="product_qty">2</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_route"/>
<field name="operation_id" ref="mrp_subcontracting.routing_fp_painting"/>
</record>

<!-- Finished product BOM with route 2 steps -->
<record id="bom_finished_route_2" model="mrp.bom">
<field name="product_tmpl_id" ref="mrp_subcontracting.finished_product_template"/>
<field name="sequence">1</field>
<field name="code">with route 2 steps</field>
<field name="routing_id" ref="mrp_subcontracting.routing_fp_2"/>
</record>
<record id="bom_finished_component_1_route_2" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.semi_finished"/>
<field name="product_qty">1</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_route_2"/>
<field name="operation_id" ref="mrp_subcontracting.routing_fp_2_assembly"/>
</record>
<record id="bom_finished_component_2_route_2" model="mrp.bom.line">
<field name="product_id" ref="mrp_subcontracting.component_3"/>
<field name="product_qty">2</field>
<field name="bom_id" ref="mrp_subcontracting.bom_finished_route_2"/>
<field name="operation_id" ref="mrp_subcontracting.routing_fp_2_assembly"/>
</record>
</data>
</odoo>
47 changes: 47 additions & 0 deletions mrp_subcontracting/demo/demo_mrp_routing.xml
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright 2019 Le Filament (<http://www.le-filament.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo>
<data noupdate="1">
<!-- Semi-Finished product routing with 1 step -->
<record id="routing_sfp" model="mrp.routing">
<field name="name">Routing 1 step for semi-finished product</field>
</record>
<record id="routing_sfp_sanding" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_subcontracting.routing_sfp"/>
<field name="workcenter_id" ref="mrp_subcontracting.my_workcenter"/>
<field name="name">Sanding</field>
<field name="sequence">90</field>
</record>

<!-- Finished product routing with 1 step -->
<record id="routing_fp" model="mrp.routing">
<field name="name">Routing 1 step for finished product</field>
</record>
<record id="routing_fp_painting" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_subcontracting.routing_fp"/>
<field name="workcenter_id" ref="mrp_subcontracting.my_workcenter"/>
<field name="name">Painting</field>
<field name="sequence">100</field>
</record>

<!-- Finished product routing with 2 steps -->
<record id="routing_fp_2" model="mrp.routing">
<field name="name">Routing 2 steps for finished product</field>
</record>
<record id="routing_fp_2_painting" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_subcontracting.routing_fp_2"/>
<field name="workcenter_id" ref="mrp_subcontracting.my_workcenter"/>
<field name="name">Painting</field>
<field name="sequence">100</field>
</record>
<record id="routing_fp_2_assembly" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_subcontracting.routing_fp_2"/>
<field name="workcenter_id" ref="mrp_subcontracting.my_workcenter"/>
<field name="name">Assembly</field>
<field name="sequence">110</field>
</record>
</data>
</odoo>
12 changes: 12 additions & 0 deletions mrp_subcontracting/demo/demo_mrp_workcenter.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright 2019 Le Filament (<http://www.le-filament.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo>
<data noupdate="1">
<record id="my_workcenter" model="mrp.workcenter">
<field name="name">My Workcenter</field>
</record>
</data>
</odoo>

0 comments on commit 17d1e6d

Please sign in to comment.