Reviewers: ,
Please review this at http://codereview.tryton.org/318001/ Affected files: M purchase_request.py Index: purchase_request.py =================================================================== --- a/purchase_request.py +++ b/purchase_request.py @@ -402,8 +402,13 @@ 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() -- [email protected] mailing list
