mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user