Fix order_points usage in get_shortage
review318001
This commit is contained in:
1 parent
00e31de71f
commit
9682c2b11a
1 file changed
+7
-2
+7
-2
@@ -417,8 +417,13 @@ class PurchaseRequest(ModelSQL, ModelView):
|
||||
res_dates = {}
|
||||
res_qties = {}
|
||||
|
||||
min_quantities = dict((x, order_points.get(x, 0.0))
|
||||
for x in product_ids)
|
||||
min_quantities = {}
|
||||
for product_id in product_ids:
|
||||
order_point = order_points.get((location_id, product_id))
|
||||
if order_point:
|
||||
min_quantities[product_id] = order_point.min_quantity
|
||||
else:
|
||||
min_quantities[product_id] = 0.0
|
||||
|
||||
current_date = min_date
|
||||
current_qties = min_date_qties.copy()
|
||||
|
||||
Reference in new issue
Block a user