-
-
Notifications
You must be signed in to change notification settings - Fork 486
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
[14.0][ADD] mrp_subcontracting_purchase #1082
Merged
OCA-git-bot
merged 4 commits into
OCA:14.0
from
cetmix:14.0-t2784-mrp_subcontracting_purchase-add_module
Oct 13, 2023
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d59b6b6
mrp_subcontracting_purchase: new module copied from 15.0
89fd156
[MIG] mrp_subcontracting_purchase: Adapt to OCA guidelines + initial …
geomer198 93cd12b
[MIG] mrp_subcontracting_purchase: Adapt to 14.0
geomer198 7634fe7
[FIX] mrp_subcontracting_purchase: DESCRIPTION is updated.
geomer198 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
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 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 @@ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "Purchase and Subcontracting Management", | ||
"summary": """ | ||
This bridge module adds some smart buttons between Purchase and Subcontracting | ||
""", | ||
"website": "https://github.com/OCA/manufacture", | ||
"version": "14.0.1.0.0", | ||
"author": "Odoo S.A., Ooops, Cetmix, Odoo Community Association (OCA)", | ||
"maintainers": ["dessanhemrayev", "CetmixGitDrone", "Volodiay622", "geomer198"], | ||
"category": "Manufacturing/Purchase", | ||
"depends": ["mrp_subcontracting", "purchase_mrp", "stock_dropshipping"], | ||
"data": [ | ||
"data/mrp_subcontracting_dropshipping_data.xml", | ||
"views/purchase_order_views.xml", | ||
"views/stock_picking_views.xml", | ||
], | ||
"demo": [ | ||
"demo/product_category_demo.xml", | ||
"demo/stock_location_demo.xml", | ||
"demo/partner_subcontract_demo.xml", | ||
"demo/product_product_demo.xml", | ||
"demo/product_supplierinfo_demo.xml", | ||
"demo/bom_subcontract_demo.xml", | ||
"demo/stock_rules_demo.xml", | ||
], | ||
"installable": True, | ||
"auto_install": True, | ||
"license": "LGPL-3", | ||
} |
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> |
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> |
15 changes: 15 additions & 0 deletions
15
mrp_subcontracting_purchase/demo/partner_subcontract_demo.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> |
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> |
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> |
32 changes: 32 additions & 0 deletions
32
mrp_subcontracting_purchase/demo/product_supplierinfo_demo.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> |
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> |
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> |
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 |
---|---|---|
@@ -0,0 +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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be put on
readme/DESCRIPTION.rst
, not here.