[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-bug-997028-mma

bzr revid: cha@tinyerp.com-20120918111235-tiffunbt9289mxe0
This commit is contained in:
Ajay Chauhan (OpenERP)
2012-09-18 16:42:35 +05:30
+2 -2
View File
@@ -100,8 +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]:
valid_lines += 1
if (return_history.get(m.id) is not None) and (m.product_qty * m.product_uom.factor > return_history[m.id]):
valid_lines += 1
if not valid_lines:
raise osv.except_osv(_('Warning!'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!"))
return res