=== modified file 'mrp/mrp.py' --- mrp/mrp.py 2010-08-31 14:06:17 +0000 +++ mrp/mrp.py 2010-09-10 11:51:02 +0000 @@ -847,8 +847,8 @@ phantom_bom_id = self.pool.get('mrp.bom').search(cr, uid, [ ('product_id', '=', procurement.move_id.product_id.id), ('bom_id', '=', False), - ('type', '=', 'phantom')]) - return phantom_bom_id + ('type', '=', 'phantom')]) + return phantom_bom_id return False def check_move_cancel(self, cr, uid, ids, context={}): @@ -1196,6 +1196,7 @@ _sql_constraints = [ ( 'qty_multiple_check', 'CHECK( qty_multiple > 0 )', _('Qty Multiple must be greater than zero.')), + ('product_location_unique', 'unique (product_id, location_id)', _('Only one order point per location is allowed!')), ] def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}):