IMP: bi_sql_editor lang

Allow to call refresh materialized view with an explicit lang passed in
the context and have this get priority over the user's lang
This commit is contained in:
Alexandre Fayolle
2022-04-28 15:53:21 +02:00
committed by thien
parent f7630f2eda
commit 68c1980f19

View File

@@ -684,7 +684,7 @@ class BiSQLView(models.Model):
# Alter name of the action, to display last refresh
# datetime of the materialized view
sql_view.action_id.with_context(
lang=self.env.user.lang
lang=self.env.context.get("lang", self.env.user.lang)
).name = sql_view._prepare_action_name()
def _refresh_size(self):