Merge pull request #138 from diagramsoftware/8.0-mrp_project-project_tax_write

[8.0][FIX] mrp_project: Fix singleton exception in 'ProjectTask.write'
This commit is contained in:
Pedro M. Baeza
2016-06-23 17:46:06 +02:00
committed by GitHub
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