[IMP] signaling: call also digits_change() when caches are cleared.

bzr revid: vmt@openerp.com-20120323112445-5jskbvjlh0x2muf8
This commit is contained in:
Vo Minh Thu 2012-03-23 12:24:45 +01:00
parent 634a1090e0
commit 6c306856fb
1 changed files with 7 additions and 0 deletions

View File

@ -284,6 +284,13 @@ class RegistryManager(object):
registry.base_cache_signaling_sequence = c
registry.clear_caches()
registry.reset_any_cache_cleared()
# One possible reason caches have been invalidated is the
# use of decimal_precision.write(), in which case we need
# to refresh fields.float columns.
for model in registry.models.values():
for column in model._columns.values():
if hasattr(column, 'digits_change'):
column.digits_change(cr)
finally:
cr.close()