[IMP] mrp: no register number check after duplicate MO
To reproduce: 1. create and confirm a MO with register number checks on operations 2. duplicate the MO The register number checks won't show up in the new MO We didn't set copy=False for workorder_id on stock.move, when copy a confirmed MO, the new moves are linked to old WOs on old MO. New WO didn't link to any moves. When create quality checks, we only create "register ..." checks for WOs with move_id. As a result, new WOs without move_id won't have those checks. To fix, set copy=False on workorder_id of stock.move Task 2484939 closes odoo/odoo#71000 X-original-commit: 6aaf337558e59474efcef937f0175ee531b4b477 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -96,7 +96,7 @@ class StockMove(models.Model):
|
||||
'mrp.routing.workcenter', 'Operation To Consume', check_company=True,
|
||||
domain="[('id', 'in', allowed_operation_ids)]")
|
||||
workorder_id = fields.Many2one(
|
||||
'mrp.workorder', 'Work Order To Consume', check_company=True)
|
||||
'mrp.workorder', 'Work Order To Consume', copy=False, check_company=True)
|
||||
# Quantities to process, in normalized UoMs
|
||||
bom_line_id = fields.Many2one('mrp.bom.line', 'BoM Line', check_company=True)
|
||||
byproduct_id = fields.Many2one(
|
||||
|
||||
Reference in New Issue
Block a user