[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.
This commit is contained in:
Simon Lejeune
2017-09-22 19:30:16 +02:00
parent 0b30f6aec4
commit d9d595a684
+1 -2
View File
@@ -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 {