[FIX] stock: it creates wrong stock moves while filling inventory for any product...
authorRifakat <rha@tinyerp.com>
Thu, 5 Jul 2012 08:05:40 +0000 (13:35 +0530)
committerRifakat <rha@tinyerp.com>
Thu, 5 Jul 2012 08:05:40 +0000 (13:35 +0530)
lp bug: https://launchpad.net/bugs/1008099 fixed

bzr revid: rha@tinyerp.com-20120705080540-txyw2y0zsmwrlgli

addons/stock/product.py

index b162e94..81d136d 100644 (file)
@@ -261,6 +261,8 @@ class product_product(osv.osv):
         if prodlot_id:
             prodlot_clause = ' and prodlot_id = %s '
             where += [prodlot_id]
+        elif 'prodlot_id' in context and not prodlot_id:
+            prodlot_clause = 'and prodlot_id is null '
 
         # TODO: perhaps merge in one query.
         if 'in' in what: