Merge PR #637 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2021-02-18 09:03:48 +00:00

View File

@@ -368,5 +368,8 @@ class Agreement(models.Model):
# Increments the revision on each save action
@api.multi
def write(self, vals):
vals["revision"] = self.revision + 1
return super(Agreement, self).write(vals)
res = True
for rec in self:
vals["revision"] = rec.revision + 1
res = super(Agreement, rec).write(vals)
return res