[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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user