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 OCA-git-bot
parent d27ab5e2b6
commit 6a59377145

View File

@@ -716,7 +716,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):