From 0ac081ca597c9b491dc50f9c3acee92ef9869e02 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 9 May 2012 16:26:41 +0530 Subject: [PATCH] [FIX]stock: fix the issue of return picking wizard lp bug: https://launchpad.net/bugs/997028 fixed bzr revid: mma@tinyerp.com-20120509105641-9ijemxgekhif76zc --- addons/stock/wizard/stock_return_picking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 689f17cd9b9..8cfe4342327 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -100,7 +100,8 @@ class stock_return_picking(osv.osv_memory): valid_lines = 0 return_history = self.get_return_history(cr, uid, record_id, context) for m in pick.move_lines: - if m.product_qty * m.product_uom.factor > return_history[m.id]: + if return_history: + if m.product_qty * m.product_uom.factor > return_history[m.id]: valid_lines += 1 if not valid_lines: raise osv.except_osv(_('Warning !'), _("There are no products to return (only lines in Done state and not fully returned yet can be returned)!"))