semillero-126 Gestión de costes: Subreglas

This commit is contained in:
Nicolás López 2014-10-27 10:29:23 +01:00
parent 9ebc35b141
commit 739b31f693
1 changed files with 5 additions and 4 deletions

View File

@ -38,10 +38,11 @@ class Lot:
with_childs=with_childs,
grouping=grouping)
keys_todel = []
if lot_ids:
for key, quantity in pbl.iteritems():
if key[2] not in lot_ids:
keys_todel.append(key)
for key, quantity in pbl.iteritems():
if lot_ids and key[2] and key[2] not in lot_ids:
keys_todel.append(key)
if not key[2]:
keys_todel.append(key)
if keys_todel:
for k in keys_todel:
del pbl[k]