[FIX]pylint

This commit is contained in:
aheficent
2017-07-31 11:29:54 +02:00
committed by Nicolas Mac Rouillon
parent c7df8d7589
commit a47ce80250

View File

@@ -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