MRP: add default product_uom from context and add link from product to bom

bzr revid: ced-d7afc65c287b8a2e73fd5d63c9a68fa45eea8e80
This commit is contained in:
ced 2007-05-24 06:53:42 +00:00
parent 34d40b2a2b
commit 9657217b58
2 changed files with 8 additions and 0 deletions

View File

@ -916,6 +916,7 @@ class stock_warehouse_orderpoint(osv.osv):
'logic': lambda *a: 'max',
'qty_multiple': lambda *a: 1,
'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '',
'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False),
}
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
if product_id:

View File

@ -677,8 +677,15 @@
<act_window name="Warehouse Orderpoint"
domain="[('product_id', '=', active_id)]"
context="{'product_uom': uom_id}"
res_model="stock.warehouse.orderpoint"
src_model="product.product"
id="act_product_product_2_stock_warehouse_orderpoint"/>
<act_window name="Bill of Material"
domain="[('product_id', '=', active_id)]"
res_model="mrp.bom"
src_model="product.product"
id="act_product_product_2_mrp_bom"/>
</data>
</terp>