[FIX]stock.py: selecting production lot without the product on the creation of stock...
authorSomesh Khare <skh@tinyerp.com>
Fri, 20 Jul 2012 07:18:31 +0000 (12:48 +0530)
committerSomesh Khare <skh@tinyerp.com>
Fri, 20 Jul 2012 07:18:31 +0000 (12:48 +0530)
bzr revid: skh@tinyerp.com-20120720071831-pnclnzi8a8v63fj2

addons/stock/stock.py

index 83a36aa..1d11248 100644 (file)
@@ -1733,6 +1733,8 @@ class stock_move(osv.osv):
         @param product_id: Product id
         @return: Warning message
         """
+        if not product_id:
+            return {}
         if not prodlot_id or not loc_id:
             return {}
         ctx = context and context.copy() or {}