diff --git a/mrp_project/models/mrp_production.py b/mrp_project/models/mrp_production.py index bee26761d..52dabe315 100644 --- a/mrp_project/models/mrp_production.py +++ b/mrp_project/models/mrp_production.py @@ -101,5 +101,7 @@ class MrpProductionWorkcenterLine(models.Model): @api.multi def write(self, vals, update=True): - return super(MrpProductionWorkcenterLine, self.with_context( - production=self.production_id)).write(vals) + for rec in self: + super(MrpProductionWorkcenterLine, rec.with_context( + production=rec.production_id)).write(vals) + return True diff --git a/mrp_project/models/project_task.py b/mrp_project/models/project_task.py index 815b998ff..43f5a68ae 100644 --- a/mrp_project/models/project_task.py +++ b/mrp_project/models/project_task.py @@ -32,5 +32,7 @@ class ProjectTask(models.Model): @api.multi def write(self, vals): - return super(ProjectTask, self.with_context( - production=self.mrp_production_id)).write(vals) + for rec in self: + super(ProjectTask, rec.with_context( + production=rec.mrp_production_id)).write(vals) + return True