From 44579cc4514d32b304560695b9084ee07055c8ac Mon Sep 17 00:00:00 2001 From: Andrea Date: Sat, 9 Jul 2016 13:52:55 +0200 Subject: [PATCH] Some flake8 and minor code review --- bi_view_editor/README.rst | 12 ------------ bi_view_editor/models/bve_view.py | 6 +++--- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/bi_view_editor/README.rst b/bi_view_editor/README.rst index 3faf6e0c..8d569646 100644 --- a/bi_view_editor/README.rst +++ b/bi_view_editor/README.rst @@ -56,18 +56,6 @@ Known issues / Roadmap * Provide a tutorial (eg. a working example of usage) -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed `feedback -`_. - Credits ======= diff --git a/bi_view_editor/models/bve_view.py b/bi_view_editor/models/bve_view.py index affaa354..2170cef9 100644 --- a/bi_view_editor/models/bve_view.py +++ b/bi_view_editor/models/bve_view.py @@ -8,6 +8,7 @@ from openerp import tools from openerp import SUPERUSER_ID from openerp import models, fields, api from openerp.exceptions import Warning as UserError +from openerp.modules.registry import RegistryManager from openerp.tools.translate import _ @@ -188,7 +189,7 @@ class BveView(models.Model): 'state': "manual" } if vals['ttype'] == 'monetary': - vals.update({'ttype': 'float'}) + vals.update({'ttype': 'float'}) if field.ttype == 'selection' and not field.selection: model_obj = self.env[field.model_id.model] selection = model_obj._columns[field.name].selection @@ -262,9 +263,8 @@ class BveView(models.Model): _build_access_rules(obj) except Exception, e: raise UserError( - _('Generic error. Unable to create the view!')) + _('Generic error. Unable to create the view! %s') % e) - from openerp.modules.registry import RegistryManager self.env.registry = RegistryManager.new(self.env.cr.dbname) RegistryManager.signal_registry_change(self.env.cr.dbname) self.pool = self.env.registry