Code review: deleted index.html and registry fixes

This commit is contained in:
astirpe
2016-03-10 11:26:36 +01:00
parent a5f92fa407
commit cf72e8dd39
3 changed files with 6 additions and 62 deletions

View File

@@ -36,7 +36,7 @@ class BveView(models.Model):
default="draft")
data = fields.Text(
string="Data",
help="Use the special Onestein query builder to define the query "
help="Use the special query builder to define the query "
"to generate your report dataset. "
"NOTE: Te be edited, the query should be in 'Draft' status.")
@@ -89,8 +89,10 @@ class BveView(models.Model):
self.action_id.view_id.sudo().unlink()
self.action_id.sudo().unlink()
self.env['ir.model'].sudo().search(
[('model', '=', self.model_name)]).unlink()
models = self.env['ir.model'].sudo().search(
[('model', '=', self.model_name)])
for model in models:
model.sudo().unlink()
table_name = self.model_name.replace(".", "_")
tools.drop_view_if_exists(self.env.cr, table_name)
@@ -255,6 +257,7 @@ class BveView(models.Model):
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
view_id = self.pool.get('ir.ui.view').create(