[IMP] runbot_merge: better notification of stored field update

Using `modified` seems safer than just blowing the cache with respect
to stored computed fields depending on PR state (not sure there are
any but it's likely).
This commit is contained in:
Xavier Morel 2020-01-13 08:47:58 +01:00
parent f91629f693
commit 63271cd82e

View File

@ -1207,7 +1207,7 @@ class PullRequests(models.Model):
WHERE id = %s AND state != 'merged'
''', [self.id])
self.env.cr.commit()
self.invalidate_cache(fnames=['state'], ids=[self.id])
self.modified(['state'])
if self.env.cr.rowcount:
self.env['runbot_merge.pull_requests.tagging'].create({
'pull_request': self.number,