Follow PEP-0249 for Transaction and backends
issue4949 review19781002
This commit is contained in:
1 parent
8ccee661ed
commit
23d9c67349
2 files changed
+3
-4
No files matched your search
+1
-2
@@ -82,9 +82,8 @@ class EmployeeCostPrice(ModelSQL, ModelView):
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TableHandler = backend.get('TableHandler')
|
||||
cursor = Transaction().cursor
|
||||
super(EmployeeCostPrice, cls).__register__(module_name)
|
||||
table = TableHandler(cursor, cls, module_name)
|
||||
table = TableHandler(cls, module_name)
|
||||
|
||||
# Migration from 2.8 drop date_cost_price_uniq
|
||||
table.drop_constraint('date_cost_price_uniq')
|
||||
|
||||
+2
-2
@@ -25,9 +25,9 @@ class TimesheetLine:
|
||||
Employee = pool.get('company.employee')
|
||||
TableHandler = backend.get('TableHandler')
|
||||
|
||||
cursor = Transaction().cursor
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table__()
|
||||
table_h = TableHandler(cursor, cls, module_name)
|
||||
table_h = TableHandler(cls, module_name)
|
||||
|
||||
migrate_cost_price = not table_h.column_exist('cost_price')
|
||||
|
||||
|
||||
Reference in new issue
Block a user