summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2019-02-22 14:30:03 +0000
committerWilliam Henrotin <whe@odoo.com>2019-02-28 14:32:06 +0000
commitabb95e4608eee72817b8b63b82e646331b445a67 (patch)
treede6098623a60cb28b15a4bf2c2e75e72b122e9a2
parenta5342daf9df67536101bd8f1d2bef31eb44c2d2b (diff)
[FIX] mrp: finished moves become raw moves
A workorder has a one2Many to stock.move to represent the production raw moves. Putting 'workorder_id' on the production finished move will set it as raw moves in the workorders closes odoo/odoo#31132
-rw-r--r--addons/mrp/models/mrp_workorder.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/mrp/models/mrp_workorder.py b/addons/mrp/models/mrp_workorder.py
index 7c70141d73c..e96527e1554 100644
--- a/addons/mrp/models/mrp_workorder.py
+++ b/addons/mrp/models/mrp_workorder.py
@@ -226,10 +226,6 @@ class MrpWorkorder(models.Model):
# TODO: should be same as checking if for every workorder something has been done?
if not self.next_work_order_id:
self._update_finished_move()
- self.production_id.move_finished_ids.filtered(
- lambda move: move.product_id == self.product_id and
- move.state not in ('done', 'cancel')
- ).workorder_id = self.id
# Transfer quantities from temporary to final move line or make them final
self._update_raw_moves()