Clear view toolbar cache when translations are changed

This commit is contained in:
Cédric Krier committed 2023-09-22 15:48:16 +02:00
1 parent 03ba93f402
commit a4b9b500a3
1 file changed
+3
+3
View File
@@ -684,6 +684,7 @@ class Translation(ModelSQL, ModelView):
cls._translation_cache.clear()
cls._translation_report_cache.clear()
ModelView._fields_view_get_cache.clear()
ModelView._view_toolbar_get_cache.clear()
return super(Translation, cls).delete(translations)
@classmethod
@@ -698,6 +699,7 @@ class Translation(ModelSQL, ModelView):
cls._translation_cache.clear()
cls._translation_report_cache.clear()
ModelView._fields_view_get_cache.clear()
ModelView._view_toolbar_get_cache.clear()
vlist = [x.copy() for x in vlist]
for vals in vlist:
@@ -718,6 +720,7 @@ class Translation(ModelSQL, ModelView):
cls._translation_cache.clear()
cls._translation_report_cache.clear()
ModelView._fields_view_get_cache.clear()
ModelView._view_toolbar_get_cache.clear()
return super(Translation, cls).write(*args)
@classmethod