Follow PEP-0249 for Transaction and backends

issue4949
review19781002
This commit is contained in:
Nicolas Évrard
2016-03-03 21:55:13 +01:00
parent 87aba046d0
commit 60cb4c7d99
+4 -4
View File
@@ -126,9 +126,9 @@ class Work(ModelSQL, ModelView):
def __register__(cls, module_name):
TimesheetWork = Pool().get('timesheet.work')
TableHandler = backend.get('TableHandler')
cursor = Transaction().cursor
table_project_work = TableHandler(cursor, cls, module_name)
table_timesheet_work = TableHandler(cursor, TimesheetWork, module_name)
cursor = Transaction().connection.cursor()
table_project_work = TableHandler(cls, module_name)
table_timesheet_work = TableHandler(TimesheetWork, module_name)
project = cls.__table__()
timesheet = TimesheetWork.__table__()
@@ -311,7 +311,7 @@ class Work(ModelSQL, ModelView):
@classmethod
def get_total(cls, works, names):
cursor = Transaction().cursor
cursor = Transaction().connection.cursor()
table = cls.__table__()
works = cls.search([