"Bugfix: 'properties' was not defined"
bzr revid: olt@tinyerp.com-20081215162233-v9m4ceexzgr9eieg
This commit is contained in:
+1
-1
@@ -235,7 +235,7 @@ class mrp_bom(osv.osv):
|
||||
return {'value': v}
|
||||
return {}
|
||||
|
||||
def _bom_find(self, cr, uid, product_id, product_uom, properties = []):
|
||||
def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):
|
||||
bom_result = False
|
||||
# Why searching on BoM without parent ?
|
||||
cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
|
||||
|
||||
@@ -67,7 +67,7 @@ def _change_prod_qty(self, cr, uid, data, context):
|
||||
bom_point = prod.bom_id
|
||||
bom_id = prod.bom_id.id
|
||||
if not bom_point:
|
||||
bom_id = pool.get('mrp.bom')._bom_find(cr, uid, prod.product_id.id, prod.product_uom.id, properties)
|
||||
bom_id = pool.get('mrp.bom')._bom_find(cr, uid, prod.product_id.id, prod.product_uom.id)
|
||||
if not bom_id:
|
||||
raise osv.except_osv('Error', "Couldn't find bill of material for product")
|
||||
self.write(cr, uid, [prod.id], {'bom_id': bom_id})
|
||||
|
||||
Reference in New Issue
Block a user