summaryrefslogtreecommitdiff
path: root/addons/mrp_subcontracting/models
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2020-06-09 10:37:11 +0200
committerSimon Lejeune <sle@openerp.com>2020-06-15 16:59:41 +0200
commited7012e8fd73d772bab5ecddd7781f888d4661f5 (patch)
treebf7b677aaec499b62695f61e6cdd1dae958a4fbb /addons/mrp_subcontracting/models
parent40603879886399a142dfc5dcf1f702fbb5ab4681 (diff)
[REF] mrp: workorders for enterprise
Removed abstract workorder Removed the integration of expiry wizard in tablet view since it should be moved in enterprise in the tablet view implementation (not possible to set consumed lot on workorders on community anymore) Refactor _set_quantity_done to use ORM command in order to not return a dict with vals to_create/to_write task-2241471
Diffstat (limited to 'addons/mrp_subcontracting/models')
-rw-r--r--addons/mrp_subcontracting/models/stock_picking.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/addons/mrp_subcontracting/models/stock_picking.py b/addons/mrp_subcontracting/models/stock_picking.py
index 43cba77b1a3..137015dc846 100644
--- a/addons/mrp_subcontracting/models/stock_picking.py
+++ b/addons/mrp_subcontracting/models/stock_picking.py
@@ -73,13 +73,7 @@ class StockPicking(models.Model):
(production.qty_producing - production.qty_produced) * move.unit_factor, production.product_uom_id,
rounding_method='HALF-UP')
move.move_line_ids.filtered(lambda ml: ml.state not in ('done', 'cancel')).qty_done = 0
- vals = move._set_quantity_done_prepare_vals(new_qty)
- if vals['to_create']:
- for res in vals['to_create']:
- move.move_line_ids.create(res)
- if vals['to_write']:
- for move_line, res in vals['to_write']:
- move_line.write(res)
+ move.move_line_ids = move._set_quantity_done_prepare_vals(new_qty)
productions |= production
for subcontracted_production in productions:
if subcontracted_production.state == 'progress':