From 5c4e7d7a2eef9c4bb6d0df6b3a4019332392d4d7 Mon Sep 17 00:00:00 2001 From: Zina Rasoamanana Date: Thu, 22 Aug 2024 10:12:58 +0200 Subject: [PATCH] [16.0][ADD] mis_builder: add option on report instance to drilldown in pop --- mis_builder/models/mis_report_instance.py | 5 ++++- mis_builder/views/mis_report_instance.xml | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mis_builder/models/mis_report_instance.py b/mis_builder/models/mis_report_instance.py index d5b096242..5a6734b7b 100644 --- a/mis_builder/models/mis_report_instance.py +++ b/mis_builder/models/mis_report_instance.py @@ -580,6 +580,9 @@ def _compute_pivot_date(self): string="Filter box search view", help="Search view to customize the filter box in the report widget.", ) + drilldown_open_in_pop_up = fields.Boolean( + string="Drilldown in a pop up window", + ) @api.depends("report_id.move_lines_source") def _compute_widget_search_view_id(self): @@ -921,7 +924,7 @@ def drilldown(self, arg): "res_model": period.source_aml_model_name, "views": [[False, view] for view in views], "view_mode": ",".join(view for view in views), - "target": "current", + "target": "new" if self.drilldown_open_in_pop_up else "current", "context": {"active_test": False}, } else: diff --git a/mis_builder/views/mis_report_instance.xml b/mis_builder/views/mis_report_instance.xml index f13fce50e..a38547542 100644 --- a/mis_builder/views/mis_report_instance.xml +++ b/mis_builder/views/mis_report_instance.xml @@ -208,6 +208,11 @@ + + + + +