From b5ecbd5b5cf1b1294ec9d3f010ec0acf0ea884ab Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Wed, 9 Oct 2019 13:21:27 +0000 Subject: [PATCH] [FIX] mrp_subcontracting: show lot name Usecase: - Set details operations on picking type - Create a receipt for a subcontracted product with tracked components - Records production - Go to details operations The move line is created however the lot name is invisible. It happens due to produce_wizard line creation. It will set the lot_id but the field lot_id is invisible if the picking type use the option 'use_create_lot' and uncheck 'use_exisiting_lot' In order to fix it set both lot_name and lot_id after the produce operation. --- addons/mrp_subcontracting/wizard/mrp_product_produce.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mrp_subcontracting/wizard/mrp_product_produce.py b/addons/mrp_subcontracting/wizard/mrp_product_produce.py index 368cfa90df7..439c2f4566c 100644 --- a/addons/mrp_subcontracting/wizard/mrp_product_produce.py +++ b/addons/mrp_subcontracting/wizard/mrp_product_produce.py @@ -43,6 +43,7 @@ class MrpProductProduce(models.TransientModel): 'product_uom_id': self.product_uom_id.id, 'qty_done': self.qty_producing, 'lot_id': self.finished_lot_id and self.finished_lot_id.id, + 'lot_name': self.finished_lot_id and self.finished_lot_id.name, }) if not self._get_todo(self.production_id): ml_reserved = self.subcontract_move_id.move_line_ids.filtered(lambda ml: