From d9d595a684226758cfdbfda94410eb48323e4480 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Fri, 22 Sep 2017 14:36:12 +0200 Subject: [PATCH] [REF] stock: immediate transfer wizard Now that the user is able to fill quantities even if the picking is in draft, the conditions to open this wizard should be adapted. --- addons/stock/models/stock_picking.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index fec1dadbe04..f731754bf05 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -647,8 +647,7 @@ class Picking(models.Model): if product and product.tracking != 'none' and (line.qty_done == 0 or (not line.lot_name and not line.lot_id)): raise UserError(_('You need to supply a lot/serial number for %s.') % product.name) - # In draft or with no pack operations edited yet, ask if we can just do everything - if self.state == 'draft' or no_quantities_done: + if no_quantities_done: view = self.env.ref('stock.view_immediate_transfer') wiz = self.env['stock.immediate.transfer'].create({'pick_id': self.id}) return {