[FIX] mrp. fix in function _moves_assigned
bzr revid: qdp-launchpad@openerp.com-20130909232102-ldbugx011vavy9jm
This commit is contained in:
commit
97cf5b2f28
|
@ -453,11 +453,12 @@ class mrp_production(osv.osv):
|
|||
|
||||
def _moves_assigned(self, cr, uid, ids, name, arg, context=None):
|
||||
""" Test whether all the consume lines are assigned """
|
||||
res = True
|
||||
res = {}
|
||||
for production in self.browse(cr, uid, ids, context=context):
|
||||
res[production.id] = True
|
||||
states = [x.state != 'assigned' for x in production.move_lines if x]
|
||||
if any(states) or len(states) == 0:
|
||||
return False
|
||||
res[production.id] = False
|
||||
return res
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue