[12.0][FIX] agreement_legal: Error when mass action on list view

agreement_legal 12.0.2.0.1
This commit is contained in:
newtratip
2021-02-18 11:09:14 +07:00
committed by Víctor Martínez
parent a78e44bff5
commit 387e6957f4
2 changed files with 6 additions and 3 deletions

View File

@@ -11,7 +11,7 @@
"website": "https://github.com/OCA/contract",
"category": "Partner",
"license": "AGPL-3",
"version": "12.0.2.0.0",
"version": "12.0.2.0.1",
"depends": ["contacts", "agreement", "product"],
"data": [
"data/ir_sequence.xml",

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