diff options
| author | yhu-odoo <yhu@odoo.com> | 2021-03-25 09:40:29 +0000 |
|---|---|---|
| committer | yhu-odoo <yhu@odoo.com> | 2021-03-25 13:35:29 +0000 |
| commit | 6aaf337558e59474efcef937f0175ee531b4b477 (patch) | |
| tree | 763d5af67540a6ec320756a5afb1ea9593bf0121 | |
| parent | 04db2309aba38325b1dad0db3a0f19829fd8b1cd (diff) | |
[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#68348
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
| -rw-r--r-- | addons/mrp/models/stock_move.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/models/stock_move.py b/addons/mrp/models/stock_move.py index 76909687285..adbcab6f0e6 100644 --- a/addons/mrp/models/stock_move.py +++ b/addons/mrp/models/stock_move.py @@ -95,7 +95,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( |
