From 89f96ed2610da179cff910e88e033f99f0477985 Mon Sep 17 00:00:00 2001 From: Lindsay Date: Thu, 12 Sep 2024 12:45:23 +0200 Subject: [PATCH] [ADD] Use the complete context to use it from the outside if needed --- mis_builder/models/mis_report_instance.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mis_builder/models/mis_report_instance.py b/mis_builder/models/mis_report_instance.py index 5a6734b7b..61caade8c 100644 --- a/mis_builder/models/mis_report_instance.py +++ b/mis_builder/models/mis_report_instance.py @@ -917,6 +917,10 @@ def drilldown(self, arg): ) domain.extend(period._get_additional_move_line_filter()) views = self._get_drilldown_model_views(period.source_aml_model_name) + # Keep all context for hook + context = dict(self.env.context) + context.update({"active_test": False}) + return { "name": self._get_drilldown_action_name(arg), "domain": domain, @@ -925,7 +929,7 @@ def drilldown(self, arg): "views": [[False, view] for view in views], "view_mode": ",".join(view for view in views), "target": "new" if self.drilldown_open_in_pop_up else "current", - "context": {"active_test": False}, + "context": context, } else: return False