mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
pylint
This commit is contained in:
@@ -449,6 +449,7 @@ class BiSQLView(models.Model):
|
||||
# Drop table, created by the ORM
|
||||
req = "DROP TABLE %s" % (sql_view.view_name)
|
||||
self.env.cr.execute(req)
|
||||
self.env.cr.commit() # pylint: disable=invalid-commit
|
||||
|
||||
@api.multi
|
||||
def _create_model_access(self):
|
||||
@@ -481,6 +482,7 @@ class BiSQLView(models.Model):
|
||||
AND attnum > 0
|
||||
ORDER BY attnum;""" % (self.view_name)
|
||||
self.env.cr.execute(req)
|
||||
self.env.cr.commit() # pylint: disable=invalid-commit
|
||||
return self.env.cr.fetchall()
|
||||
|
||||
@api.multi
|
||||
@@ -556,8 +558,8 @@ class BiSQLView(models.Model):
|
||||
self._log_execute(req)
|
||||
sql_view._refresh_size()
|
||||
if sql_view.action_id:
|
||||
# Alter name of the action, to display last refresh datetime
|
||||
# of the materialized view
|
||||
# Alter name of the action, to display last refresh
|
||||
# datetime of the materialized view
|
||||
sql_view.action_id.name = "%s (%s)" % (
|
||||
self.name,
|
||||
datetime.utcnow().strftime(_("%m/%d/%Y %H:%M:%S UTC")))
|
||||
@@ -569,3 +571,4 @@ class BiSQLView(models.Model):
|
||||
sql_view.view_name)
|
||||
self.env.cr.execute(req)
|
||||
sql_view.size = self.env.cr.fetchone()[0]
|
||||
self.env.cr.commit() # pylint: disable=invalid-commit
|
||||
|
||||
Reference in New Issue
Block a user