Follow PEP-0249 for Transaction and backends
issue4949 review19781002
This commit is contained in:
1 parent
d2151931fe
commit
37db296525
1 file changed
+1
-3
+1
-3
@@ -3,7 +3,6 @@
|
||||
from trytond import backend
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pool import Pool
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
__all__ = ['Allocation']
|
||||
|
||||
@@ -22,12 +21,11 @@ class Allocation(ModelSQL, ModelView):
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TableHandler = backend.get('TableHandler')
|
||||
cursor = Transaction().cursor
|
||||
|
||||
super(Allocation, cls).__register__(module_name)
|
||||
|
||||
# Migration from 3.2:
|
||||
table = TableHandler(cursor, cls, module_name)
|
||||
table = TableHandler(cls, module_name)
|
||||
table.drop_constraint('percentage_positive')
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in new issue
Block a user