From 3a8208a76d3812ec0e7d01db1efd2bbaac01f666 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 3 Sep 2010 19:52:12 +0200 Subject: [PATCH] [FIX] stock: correct production lot tracking bzr revid: odo@openerp.com-20100903175212-g0ggajd9pruwsloa --- addons/stock/stock.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index fa2c420cf89..004c1aba2f2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1401,15 +1401,13 @@ class stock_move(osv.osv): @return: True or False """ for move in self.browse(cr, uid, ids): - if move.picking_id and move.picking_id.type=="internal": - return True 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