From 41827e60e92e692dbcef70682a172f7896e35777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Mon, 4 May 2015 10:12:58 +0200 Subject: [PATCH] [FIX] mis_builder: excel export works again... strange --- mis_builder/models/mis_builder.py | 13 +++++++++++++ mis_builder/views/mis_builder.xml | 11 +---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/mis_builder/models/mis_builder.py b/mis_builder/models/mis_builder.py index fe20f16d..b6bf5871 100644 --- a/mis_builder/models/mis_builder.py +++ b/mis_builder/models/mis_builder.py @@ -689,6 +689,19 @@ class mis_report_instance(orm.Model): tools.DEFAULT_SERVER_DATE_FORMAT), tformat) + def preview(self, cr, uid, _id, context=None): + view_id = self.pool['ir.model.data'].get_object_reference( + cr, uid, 'mis_builder', 'mis_report_instance_result_view_form')[1] + return { + 'type': 'ir.actions.act_window', + 'res_model': 'mis.report.instance', + 'res_id': _id[0], + 'view_mode': 'form', + 'view_type': 'form', + 'view_id': view_id, + 'target': 'new', + } + def compute(self, cr, uid, _id, context=None): assert isinstance(_id, (int, long)) if context is None: diff --git a/mis_builder/views/mis_builder.xml b/mis_builder/views/mis_builder.xml index 8fb0704b..21acfdbf 100644 --- a/mis_builder/views/mis_builder.xml +++ b/mis_builder/views/mis_builder.xml @@ -120,15 +120,6 @@ - - Preview - - mis.report.instance - form - form - new - - mis.report.instance.view.tree mis.report.instance @@ -160,7 +151,7 @@
-