Follow PEP-0249 for Transaction and backends

issue4949
review19781002
This commit is contained in:
Nicolas Évrard committed 2016-03-03 21:55:17 +01:00
1 parent d2151931fe
commit 37db296525
1 file changed
+1 -3
+1 -3
View File
@@ -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