[FIX] mrp_project: Fix singleton exception in 'ProjectTask.write'

Records are now iterated to avoid singleton errors. Same fix
has been applied in 'MrpProductionWorkcenterLine.write' also.
This commit is contained in:
Cristian Moncho
2016-06-23 16:24:54 +02:00
parent eb0789d4c8
commit 222479f90d
2 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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