[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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user