From 6a5937714506841537b41481056546bfd17c9c6e Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Thu, 28 Apr 2022 15:53:21 +0200 Subject: [PATCH] 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 --- bi_sql_editor/models/bi_sql_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bi_sql_editor/models/bi_sql_view.py b/bi_sql_editor/models/bi_sql_view.py index 588fb36eb..0c85a4ec3 100644 --- a/bi_sql_editor/models/bi_sql_view.py +++ b/bi_sql_editor/models/bi_sql_view.py @@ -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):