[FIX] Stock : Constraint for Lot checking corrected(Courtesy: Maintenance case ID...
authorQuentin,Delphine,Dhruti <>
Fri, 7 Jan 2011 04:54:47 +0000 (10:24 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Fri, 7 Jan 2011 04:54:47 +0000 (10:24 +0530)
bzr revid: jvo@tinyerp.com-20110107045447-zfebvhwdf54kg0c2

addons/stock/stock.py

index db83331..f11f1de 100644 (file)
@@ -1001,10 +1001,10 @@ class stock_move(osv.osv):
             if not move.prodlot_id and \
                (move.state == 'done' and \
                ( \
-                   (move.product_id.track_production and move.location_id.usage=='production') or \
-                   (move.product_id.track_production and move.location_dest_id.usage=='production') or \
-                   (move.product_id.track_incoming and move.location_id.usage in ('supplier','internal')) or \
-                   (move.product_id.track_outgoing and move.location_dest_id.usage in ('customer','internal')) \
+                   (move.product_id.track_production and move.location_id.usage == 'production') or \
+                   (move.product_id.track_production and move.location_dest_id.usage == 'production') or \
+                   (move.product_id.track_incoming and move.location_id.usage == 'supplier') or \
+                   (move.product_id.track_outgoing and move.location_dest_id.usage == 'customer') \
                )):
                 return False
         return True