[FIX] clear the cache when changing translations

bzr revid: christophe@tinyerp.com-20090105212101-p0sp6exmw2jbldyk
This commit is contained in:
Christophe Simonis 2009-01-05 22:21:01 +01:00
parent 5a20219f9b
commit 20ad606d8b
1 changed files with 7 additions and 0 deletions

View File

@ -98,6 +98,13 @@ class ir_translation(osv.osv):
return translations
def _set_ids(self, cr, uid, name, tt, lang, ids, value):
# clear the caches
tr = self._get_ids(cr, uid, name, tt, lang, ids)
for res_id in tr:
if tr[res_id]:
self._get_source.clear_cache(cr.dbname, uid, name, tt, lang, tr[res_id])
self._get_source.clear_cache(cr.dbname, uid, name, tt, lang)
cr.execute('delete from ir_translation ' \
'where lang=%s ' \
'and type=%s ' \