summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSaurang Suthar (OpenERP) <ssu@tinyerp.com>2012-04-26 18:41:13 +0530
committerSaurang Suthar (OpenERP) <ssu@tinyerp.com>2012-04-26 18:41:13 +0530
commit7f5fdbc8a5a2e9921acf3cd79bded61e7fb658a9 (patch)
treeea760d59c931e7854d7275d0e63c0c397886b516 /addons
parent76b7573716daaf34e2fec7ae7fc6e6bf13bdd225 (diff)
[IMP]:BoM and minimum stock rules are visible directly in the product form without having to click on the relate icon
bzr revid: ssu@tinyerp.com-20120426131113-nhp6432tixh0e278
Diffstat (limited to 'addons')
-rw-r--r--addons/mrp/mrp_view.xml11
-rw-r--r--addons/procurement/procurement_view.xml9
-rw-r--r--addons/stock/product.py2
-rw-r--r--addons/stock/product_view.xml6
4 files changed, 9 insertions, 19 deletions
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 57fffebda40..8b5bb798c37 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -450,7 +450,7 @@
<field name="type">tree</field>
<field name="field_parent">child_complete_ids</field>
<field name="arch" type="xml">
- <tree string="BoM Structure" colors="blue:method">
+ <tree string="Bill of Materials" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="name"/>
<field name="code"/>
@@ -1011,15 +1011,6 @@
src_model="product.product"
groups="mrp.group_mrp_user"/>
- <act_window
- domain="[('bom_id','=',False)]"
- context="{'search_default_product_id': [active_id],'default_product_id':active_id}"
- id="act_product_product_2_mrp_bom"
- name="Bill of Materials"
- res_model="mrp.bom"
- src_model="product.product"
- groups="mrp.group_mrp_user"/>
-
<!-- Menu for Resource for MRP-->
<record id="mrp_workcenter_action" model="ir.actions.act_window">
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index 42fa0267e55..13364c7c3d9 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -251,15 +251,6 @@
src_model="stock.warehouse"
groups="stock.group_stock_user"/>
- <!-- add product_uom to context to be the default value when adding new orderpoints -->
- <act_window
- context="{'product_uom': locals().has_key('uom_id') and uom_id,'search_default_product_id': [active_id], 'default_product_id': active_id}"
- id="act_product_product_2_stock_warehouse_orderpoint"
- name="Minimum Stock Rules"
- res_model="stock.warehouse.orderpoint"
- src_model="product.product"
- groups="stock.group_stock_user"/>
-
<act_window
context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
id="act_procurement_2_stock_warehouse_orderpoint"
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 304fa8dcd87..4af922dc1b5 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -398,6 +398,8 @@ class product_product(osv.osv):
help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves." \
"The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products."
, required=True),
+ 'minimum_stock_rule': fields.one2many('stock.warehouse.orderpoint','product_id','Minimum Stock Rules', help="This is Minimum Stock Rule"),
+ 'bill_of_material': fields.one2many('mrp.bom','product_id','Bill Of Materials', help="This is Bill of Materials"),
}
_defaults = {
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index f702385b5b0..d3329aa65cf 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -116,6 +116,12 @@
<field name="incoming_qty"/>
<field name="outgoing_qty"/>
</group>
+ <group colspan="4">
+ <field name="minimum_stock_rule" nolabel="1" context="{'default_product_id': active_id}"/>
+ </group>
+ <group colspan="4">
+ <field name="bill_of_material" nolabel="1" context="{'default_product_id': active_id}"/>
+ </group>
<group colspan="2" col="2" name="lot" groups="stock.group_tracking_lot,stock.group_production_lot">
<separator string="Lots" colspan="4"/>
<field name="track_production" groups="stock.group_production_lot"/>