From 8876b8b3db9bd0a937ce91037fb0063e25aa23f1 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 20 Feb 2018 14:53:05 +0100 Subject: [PATCH] [FIX] stock: validate picking in waiting state When a picking is in 'Waiting Another Operation' state, there is no possibility to force the validation. In v10, it was possible to force the reservation, which is not possible anymore. Therefore, we make the 'Validate' button accessible in the mentioned state. opw-817234 --- addons/stock/models/stock_picking.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 6717176e3b5..24ff58c843a 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -443,7 +443,7 @@ class Picking(models.Model): for picking in self: if self._context.get('planned_picking') and picking.state == 'draft': picking.show_validate = False - elif picking.state not in ('draft', 'confirmed', 'assigned') or not picking.is_locked: + elif picking.state not in ('draft', 'waiting', 'confirmed', 'assigned') or not picking.is_locked: picking.show_validate = False else: picking.show_validate = True @@ -594,8 +594,7 @@ class Picking(models.Model): @return: True """ # TDE FIXME: remove decorator when migration the remaining - # TDE FIXME: draft -> automatically done, if waiting ?? CLEAR ME - todo_moves = self.mapped('move_lines').filtered(lambda self: self.state in ['draft', 'partially_available', 'assigned', 'confirmed']) + todo_moves = self.mapped('move_lines').filtered(lambda self: self.state in ['draft', 'waiting', 'partially_available', 'assigned', 'confirmed']) # Check if there are ops not linked to moves yet for pick in self: # # Explode manually added packages