diff --git a/bi_sql_editor/__openerp__.py b/bi_sql_editor/__openerp__.py index edd4bf5f..d3920444 100644 --- a/bi_sql_editor/__openerp__.py +++ b/bi_sql_editor/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'BI SQL Editor', 'summary': "BI Views builder, based on Materialized or Normal SQL Views", - 'version': '9.0.1.0.0', + 'version': '9.0.1.1.0', 'license': 'AGPL-3', 'category': 'Reporting', 'author': 'GRAP,Odoo Community Association (OCA)', diff --git a/bi_sql_editor/models/bi_sql_view.py b/bi_sql_editor/models/bi_sql_view.py index 72ac835c..ab03b617 100644 --- a/bi_sql_editor/models/bi_sql_view.py +++ b/bi_sql_editor/models/bi_sql_view.py @@ -571,3 +571,9 @@ class BiSQLView(models.Model): sql_view.view_name) self.env.cr.execute(req) sql_view.size = self.env.cr.fetchone()[0] + + @api.multi + def button_preview_sql_expression(self): + self.button_validate_sql_expression() + res = self._execute_sql_request() + raise UserError('\n'.join(map(lambda x: str(x), res[:100]))) diff --git a/bi_sql_editor/views/view_bi_sql_view.xml b/bi_sql_editor/views/view_bi_sql_view.xml index 14aecd12..9863b9df 100644 --- a/bi_sql_editor/views/view_bi_sql_view.xml +++ b/bi_sql_editor/views/view_bi_sql_view.xml @@ -29,6 +29,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).