[IMP] models: mark records as recomputed as soon as they are

When recomputing stored function fields, the `write` may trigger a
cache invalidation which lead to a recompute of all the recordset
values, even the ones already saved in database.
This commit is contained in:
Nicolas Seinlet 2016-05-12 11:44:57 +02:00 committed by Christophe Simonis
parent f207ef5fae
commit 3a32021122
1 changed files with 1 additions and 0 deletions

View File

@ -5757,6 +5757,7 @@ class BaseModel(object):
name: rec[name] for name in names
})
with rec.env.norecompute():
map(rec._recompute_done, field.computed_fields)
rec._write(values)
except MissingError:
pass