From f6c89de81eb105eb916d5a5cdca1f44bddd65c36 Mon Sep 17 00:00:00 2001 From: amoyaux Date: Thu, 12 Oct 2017 16:26:32 +0200 Subject: [PATCH] [FIX] mrp: finished move lines view does not show lot The stock_move_line view for finished product on MO was the classic one which shows lot_name and other useless stuff This commit improve it by using the lot_id instead and a new view that only contains relevant information for the end user. --- addons/mrp/models/mrp_production.py | 2 +- addons/mrp/views/mrp_production_views.xml | 2 +- addons/mrp/views/stock_move_views.xml | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 59bafc27487..4a56ef217bc 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -107,7 +107,7 @@ class MrpProduction(models.Model): copy=False, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, domain=[('scrapped', '=', False)]) finished_move_line_ids = fields.One2many( - 'stock.move.line', compute='_compute_lines', inverse='_inverse_lines', + 'stock.move.line', compute='_compute_lines', inverse='_inverse_lines', string="Finished Product" ) workorder_ids = fields.One2many( 'mrp.workorder', 'production_id', 'Work Orders', diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 2188e912eab..e8a59d049ce 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -131,7 +131,7 @@ - + diff --git a/addons/mrp/views/stock_move_views.xml b/addons/mrp/views/stock_move_views.xml index f1007b8d26b..a6c2a07417a 100644 --- a/addons/mrp/views/stock_move_views.xml +++ b/addons/mrp/views/stock_move_views.xml @@ -63,6 +63,28 @@ + + mrp.finished.move.line.form + stock.move.line + +
+ + + + + +
+
+
+