From 9054d082be2d388801dfefe2f7758a1d62ea0cc2 Mon Sep 17 00:00:00 2001 From: amoyaux Date: Fri, 11 Aug 2017 16:17:48 +0200 Subject: [PATCH] [IMP] stock: picking and ml views improvements. commit 0a960c08757a8ba5e1dc1dd36c17a35de8913975 introduced change about reserved quantity that set it to 0 once the move is done. This commit add views improvement. If the move lines are done reserved quantity does not really matter and thus it is better to not display it. Modify the decorator on stock picking that change the font to red if the quantity processed is greater than the reserved quantity. This decorator does not trigger if the picking is in state done since reserved quantity is always 0. --- addons/stock/models/stock_move.py | 1 + addons/stock/views/stock_move_views.xml | 2 +- addons/stock/views/stock_picking_views.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index d0d51e0f217..5eab237011e 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -436,6 +436,7 @@ class StockMove(models.Model): show_source_location=self.location_id.child_ids, show_destination_location=self.location_dest_id.child_ids, show_package=not self.location_id.usage == 'supplier', + show_reserved_quantity=self.state != 'done' ), } diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index c9a906b5da3..6c9e5230575 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -176,7 +176,7 @@ - + diff --git a/addons/stock/views/stock_picking_views.xml b/addons/stock/views/stock_picking_views.xml index 1fca0c2b2b2..66b287e8cab 100644 --- a/addons/stock/views/stock_picking_views.xml +++ b/addons/stock/views/stock_picking_views.xml @@ -277,7 +277,7 @@ - +