Browse Source

Some flake8 and minor code review

pull/59/head
Andrea 9 years ago
parent
commit
44579cc451
  1. 12
      bi_view_editor/README.rst
  2. 4
      bi_view_editor/models/bve_view.py

12
bi_view_editor/README.rst

@ -56,18 +56,6 @@ Known issues / Roadmap
* Provide a tutorial (eg. a working example of usage) * Provide a tutorial (eg. a working example of usage)
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/reporting-engine/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
<https://github.com/OCA/
reporting-engine/issues/new?body=module:%20
bi_view_editor%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits Credits
======= =======

4
bi_view_editor/models/bve_view.py

@ -8,6 +8,7 @@ from openerp import tools
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
from openerp import models, fields, api from openerp import models, fields, api
from openerp.exceptions import Warning as UserError from openerp.exceptions import Warning as UserError
from openerp.modules.registry import RegistryManager
from openerp.tools.translate import _ from openerp.tools.translate import _
@ -262,9 +263,8 @@ class BveView(models.Model):
_build_access_rules(obj) _build_access_rules(obj)
except Exception, e: except Exception, e:
raise UserError( 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) self.env.registry = RegistryManager.new(self.env.cr.dbname)
RegistryManager.signal_registry_change(self.env.cr.dbname) RegistryManager.signal_registry_change(self.env.cr.dbname)
self.pool = self.env.registry self.pool = self.env.registry

Loading…
Cancel
Save