-
-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mrp_subcontracting_purchase: Adapt to 14.0
- Loading branch information
Showing
34 changed files
with
2,145 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
mrp_subcontracting_purchase/data/mrp_subcontracting_dropshipping_data.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<record id="route_subcontracting_dropshipping" model='stock.location.route'> | ||
<field name="name">Dropship Subcontractor on Order</field> | ||
<field name="sequence">5</field> | ||
<field name="company_id" /> | ||
<field name="product_selectable" eval="True" /> | ||
</record> | ||
|
||
<function | ||
model="res.company" | ||
name="create_missing_subcontracting_dropshipping_rules" | ||
/> | ||
|
||
<function model="stock.warehouse" name="write"> | ||
<value | ||
model="stock.warehouse" | ||
eval="obj().env['stock.warehouse'].search([]).ids" | ||
/> | ||
<value eval="{'subcontracting_dropshipping_to_resupply': True}" /> | ||
</function> | ||
</data> | ||
</odoo> |
5 changes: 5 additions & 0 deletions
5
mrp_subcontracting_purchase/demo/0001_demo_product_category.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<odoo> | ||
<record id="product_category_subcontracting_product" model="product.category"> | ||
<field name="name">Subcontracting products</field> | ||
</record> | ||
</odoo> |
15 changes: 15 additions & 0 deletions
15
mrp_subcontracting_purchase/demo/0002_demo_partner_subcontract.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<odoo> | ||
<record id="res_partner_subcontracting_1" model="res.partner"> | ||
<field name="name">Sub 1</field> | ||
<field name="property_stock_subcontractor" ref="demo_stock_location_sub_1" /> | ||
</record> | ||
|
||
<record id="res_partner_subcontracting_2" model="res.partner"> | ||
<field name="name">Sub 2</field> | ||
<field name="property_stock_subcontractor" ref="demo_stock_location_sub_2" /> | ||
</record> | ||
|
||
<record id="res_partner_subcontracting_vendor" model="res.partner"> | ||
<field name="name">Vendor</field> | ||
</record> | ||
</odoo> |
40 changes: 40 additions & 0 deletions
40
mrp_subcontracting_purchase/demo/0003_demo_product_test_product.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<odoo> | ||
<record id="demo_product_product_finished" model="product.product"> | ||
<field name="name">Finished</field> | ||
<field name="type">product</field> | ||
<field name="list_price">10</field> | ||
<field name="taxes_id" eval="False" /> | ||
<field name="sale_ok" eval="False" /> | ||
<field name="categ_id" ref="product_category_subcontracting_product" /> | ||
<field | ||
name="route_ids" | ||
eval="[(6, 0,[ref('purchase_stock.route_warehouse0_buy')])]" | ||
/> | ||
</record> | ||
|
||
<record id="demo_product_product_component" model="product.product"> | ||
<field name="name">Component</field> | ||
<field name="type">product</field> | ||
<field name="list_price">10</field> | ||
<field name="taxes_id" eval="False" /> | ||
<field name="sale_ok" eval="False" /> | ||
<field name="categ_id" ref="product_category_subcontracting_product" /> | ||
<field | ||
name="route_ids" | ||
eval="[(6, 0,[ref('route_subcontracting_dropshipping')])]" | ||
/> | ||
</record> | ||
|
||
<record id="demo_product_product_element" model="product.product"> | ||
<field name="name">Element</field> | ||
<field name="type">product</field> | ||
<field name="list_price">10</field> | ||
<field name="taxes_id" eval="False" /> | ||
<field name="sale_ok" eval="False" /> | ||
<field name="categ_id" ref="product_category_subcontracting_product" /> | ||
<field | ||
name="route_ids" | ||
eval="[(6, 0,[ref('route_subcontracting_dropshipping')])]" | ||
/> | ||
</record> | ||
</odoo> |
58 changes: 58 additions & 0 deletions
58
mrp_subcontracting_purchase/demo/0004_demo_bom_subcontract.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<odoo noupdate="1"> | ||
<record id="mrp_bom_subcontract_1" model="mrp.bom"> | ||
<field | ||
name="product_tmpl_id" | ||
ref="demo_product_product_finished_product_template" | ||
/> | ||
<field name="product_uom_id" ref="uom.product_uom_unit" /> | ||
<field name="type">subcontract</field> | ||
<field | ||
name="subcontractor_ids" | ||
eval="[(6, 0,[ref('res_partner_subcontracting_1')] )]" | ||
/> | ||
<field name="sequence">1</field> | ||
</record> | ||
|
||
<record id="mrp_bom_subcontract_2" model="mrp.bom"> | ||
<field | ||
name="product_tmpl_id" | ||
ref="demo_product_product_component_product_template" | ||
/> | ||
<field name="product_uom_id" ref="uom.product_uom_unit" /> | ||
<field name="type">subcontract</field> | ||
<field | ||
name="subcontractor_ids" | ||
eval="[(6, 0,[ref('res_partner_subcontracting_2')] )]" | ||
/> | ||
<field name="sequence">1</field> | ||
</record> | ||
|
||
<record id="mrp_bom_subcontract_1_manufacture_line_1" model="mrp.bom.line"> | ||
<field | ||
name="product_id" | ||
ref="mrp_subcontracting_purchase.demo_product_product_component" | ||
/> | ||
<field name="product_qty">1</field> | ||
<field name="product_uom_id" ref="uom.product_uom_unit" /> | ||
<field name="sequence">5</field> | ||
<field | ||
name="bom_id" | ||
ref="mrp_subcontracting_purchase.mrp_bom_subcontract_1" | ||
/> | ||
</record> | ||
|
||
<record id="mrp_bom_subcontract_2_manufacture_line_1" model="mrp.bom.line"> | ||
<field | ||
name="product_id" | ||
ref="mrp_subcontracting_purchase.demo_product_product_element" | ||
/> | ||
<field name="product_qty">1</field> | ||
<field name="product_uom_id" ref="uom.product_uom_unit" /> | ||
<field name="sequence">5</field> | ||
<field | ||
name="bom_id" | ||
ref="mrp_subcontracting_purchase.mrp_bom_subcontract_2" | ||
/> | ||
</record> | ||
|
||
</odoo> |
32 changes: 32 additions & 0 deletions
32
mrp_subcontracting_purchase/demo/0005_demo_product_supplierinfo.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
<odoo> | ||
<record id="product_supplierinfo_subcontract_1" model="product.supplierinfo"> | ||
<field | ||
name="product_tmpl_id" | ||
ref="demo_product_product_finished_product_template" | ||
/> | ||
<field name="price">10</field> | ||
<field name="name" ref="res_partner_subcontracting_1" /> | ||
<field name="currency_id" ref="base.USD" /> | ||
</record> | ||
|
||
<record id="product_supplierinfo_subcontract_2" model="product.supplierinfo"> | ||
<field | ||
name="product_tmpl_id" | ||
ref="demo_product_product_component_product_template" | ||
/> | ||
<field name="price">10</field> | ||
<field name="name" ref="res_partner_subcontracting_2" /> | ||
<field name="currency_id" ref="base.USD" /> | ||
</record> | ||
|
||
<record id="product_supplierinfo_subcontract_3" model="product.supplierinfo"> | ||
<field | ||
name="product_tmpl_id" | ||
ref="demo_product_product_element_product_template" | ||
/> | ||
<field name="price">10</field> | ||
<field name="name" ref="res_partner_subcontracting_vendor" /> | ||
<field name="currency_id" ref="base.USD" /> | ||
</record> | ||
</odoo> |
68 changes: 68 additions & 0 deletions
68
mrp_subcontracting_purchase/demo/0006_demo_stock_rules.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
<odoo> | ||
<record id="demo_stock_rules_1" model="stock.rule"> | ||
<field name="name">Vendors — Sub 1</field> | ||
<field name="action">buy</field> | ||
<field name="location_id" ref="demo_stock_location_sub_1" /> | ||
<field name="route_id" ref="route_subcontracting_dropshipping" /> | ||
<field name="company_id" ref="base.main_company" /> | ||
<field | ||
name="picking_type_id" | ||
model="stock.picking.type" | ||
eval="obj().with_context(active_test=False).search([('name','=','Dropship'),('sequence_code','=','DS'),('company_id','=',obj().env.company.id)],limit=1)" | ||
/> | ||
</record> | ||
|
||
<record id="demo_stock_rules_2" model="stock.rule"> | ||
<field name="name">Vendors — Sub 2</field> | ||
<field name="action">buy</field> | ||
<field name="location_id" ref="demo_stock_location_sub_2" /> | ||
<field name="route_id" ref="route_subcontracting_dropshipping" /> | ||
<field name="company_id" ref="base.main_company" /> | ||
<field | ||
name="picking_type_id" | ||
model="stock.picking.type" | ||
eval="obj().with_context(active_test=False).search([('name','=','Dropship'),('sequence_code','=','DS'),('company_id','=',obj().env.company.id)],limit=1)" | ||
/> | ||
</record> | ||
|
||
<record id="demo_stock_rules_3" model="stock.rule"> | ||
<field name="name">Sub 1 — Production</field> | ||
<field name="action">pull</field> | ||
<field | ||
name="picking_type_id" | ||
model="stock.picking.type" | ||
eval="obj().with_context(active_test=False).search([('name','=','Subcontracting'),('sequence_code','=','SBC')],limit=1)" | ||
/> | ||
<field name="location_src_id" ref="demo_stock_location_sub_1" /> | ||
<field | ||
name="location_id" | ||
model="stock.location" | ||
eval="obj().search([('name','=','Production')],limit=1)" | ||
/> | ||
<field name="route_id" ref="route_subcontracting_dropshipping" /> | ||
<field name="warehouse_id" ref="stock.warehouse0" /> | ||
<field name="procure_method">make_to_order</field> | ||
<field name="partner_address_id" ref="res_partner_subcontracting_1" /> | ||
</record> | ||
|
||
<record id="demo_stock_rules_4" model="stock.rule"> | ||
<field name="name">Sub 2 — Production</field> | ||
<field name="action">pull</field> | ||
<field | ||
name="picking_type_id" | ||
model="stock.picking.type" | ||
eval="obj().with_context(active_test=False).search([('name','=','Subcontracting'),('sequence_code','=','SBC')],limit=1)" | ||
/> | ||
<field name="location_src_id" ref="demo_stock_location_sub_2" /> | ||
<field | ||
name="location_id" | ||
model="stock.location" | ||
eval="obj().search([('name','=','Production')],limit=1)" | ||
/> | ||
<field name="route_id" ref="route_subcontracting_dropshipping" /> | ||
<field name="warehouse_id" ref="stock.warehouse0" /> | ||
<field name="procure_method">make_to_order</field> | ||
<field name="partner_address_id" ref="res_partner_subcontracting_2" /> | ||
</record> | ||
</odoo> |
21 changes: 21 additions & 0 deletions
21
mrp_subcontracting_purchase/demo/0011_demo_stock_location.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
<odoo> | ||
<record id="demo_stock_location_sub_1" model="stock.location"> | ||
<field name="name">sub1</field> | ||
<field | ||
name="location_id" | ||
model="stock.location" | ||
eval="obj().with_context(active_test=False).search([('name','=','Subcontracting Location'),('company_id','=',obj().env.company.id)],limit=1)" | ||
/> | ||
<field name="company_id" ref="base.main_company" /> | ||
</record> | ||
<record id="demo_stock_location_sub_2" model="stock.location"> | ||
<field name="name">sub2</field> | ||
<field | ||
name="location_id" | ||
model="stock.location" | ||
eval="obj().with_context(active_test=False).search([('name','=','Subcontracting Location'),('company_id','=',obj().env.company.id)],limit=1)" | ||
/> | ||
<field name="company_id" ref="base.main_company" /> | ||
</record> | ||
</odoo> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import stock_move | ||
from . import stock_warehouse | ||
from . import stock_picking | ||
from . import stock_rule | ||
from . import purchase_order | ||
from . import purchase_order_line | ||
from . import res_company | ||
from . import mrp_production |
Oops, something went wrong.