From a8a25cb8c90b4bca367e2811aec68d998d186b0c Mon Sep 17 00:00:00 2001 From: amoyaux Date: Tue, 18 Jul 2017 12:29:10 +0200 Subject: [PATCH] [FIX] stock : consignment update views Consignment worked in backend but there was no tools in front end in order to use it. This commit update the views and add consignment in picking and stock move lines --- addons/stock/models/stock_move.py | 3 ++- addons/stock/views/stock_move_views.xml | 2 ++ addons/stock/views/stock_picking_views.xml | 7 +++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index 056e259b1a0..d5633a7889c 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -179,9 +179,10 @@ class StockMove(models.Model): if self.user_has_groups('stock.group_stock_multi_locations'): multi_locations_enabled = move.location_id.child_ids or move.location_dest_id.child_ids has_package = move.move_line_ids.mapped('package_id') | move.move_line_ids.mapped('result_package_id') + consignment_enabled = self.user_has_groups('stock.group_tracking_owner') if move.picking_id.picking_type_id.show_operations is False\ and move.state not in ['cancel', 'draft', 'confirmed']\ - and (multi_locations_enabled or move.has_tracking != 'none' or len(move.move_line_ids) > 1 or has_package): + and (multi_locations_enabled or move.has_tracking != 'none' or len(move.move_line_ids) > 1 or has_package or consignment_enabled): move.show_details_visible = True else: move.show_details_visible = False diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 3908dd89520..337a9b287eb 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -175,6 +175,7 @@ + @@ -211,6 +212,7 @@ + diff --git a/addons/stock/views/stock_picking_views.xml b/addons/stock/views/stock_picking_views.xml index 84a2d637ff7..79aa4ed3c73 100644 --- a/addons/stock/views/stock_picking_views.xml +++ b/addons/stock/views/stock_picking_views.xml @@ -244,11 +244,10 @@ - -
- + +