[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
This commit is contained in:
Saurang Suthar (OpenERP) 2012-04-26 18:41:13 +05:30
parent 76b7573716
commit 7f5fdbc8a5
4 changed files with 9 additions and 19 deletions

View File

@ -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">

View File

@ -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"

View File

@ -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 = {

View File

@ -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"/>