[FIX] repair: Unable to end repair
Steps to reproduce the bug: - Create a repair order RO for a product P1 - Create a part for a product P2 that needs a lot L - Specify a source location for P2 - Process RO - Click on 'END REPAIR' Bug: A UserError was raised saying: You need to supply a Lot/Serial number for product P2 even if a lot L was set to P2 opw:2251047 closes odoo/odoo#51797 X-original-commit: 1e3ed56332efd3f58ccd05f23c6af9cb23f1052f Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -546,6 +546,9 @@ class Repair(models.Model):
|
||||
# quant is created in operation.location_id.
|
||||
move._set_quantity_done(operation.product_uom_qty)
|
||||
|
||||
if operation.lot_id:
|
||||
move.move_line_ids.lot_id = operation.lot_id
|
||||
|
||||
moves |= move
|
||||
operation.write({'move_id': move.id, 'state': 'done'})
|
||||
move = Move.create({
|
||||
|
||||
Reference in New Issue
Block a user