From 926647065b703ead13814b65aa92ea66e0646e87 Mon Sep 17 00:00:00 2001 From: Andrea Stirpe Date: Mon, 11 Jul 2016 17:49:19 +0200 Subject: [PATCH] Revert removal of cr.commit() --- bi_view_editor/models/bve_view.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bi_view_editor/models/bve_view.py b/bi_view_editor/models/bve_view.py index 2170cef9..d3e845df 100644 --- a/bi_view_editor/models/bve_view.py +++ b/bi_view_editor/models/bve_view.py @@ -256,14 +256,10 @@ class BveView(models.Model): [x for x in self.name.lower() if x.isalnum()]).replace("_", ".").replace(" ", ".") - try: - with self.env.cr.savepoint(): - _build_query() - obj = _build_object() - _build_access_rules(obj) - except Exception, e: - raise UserError( - _('Generic error. Unable to create the view! %s') % e) + _build_query() + obj = _build_object() + _build_access_rules(obj) + self.env.cr.commit() self.env.registry = RegistryManager.new(self.env.cr.dbname) RegistryManager.signal_registry_change(self.env.cr.dbname)