Add __table_handler__ to ModelSQL
issue7581 review48531002
This commit is contained in:
1 parent
becaf00695
commit
d9a4e32d5b
1 file changed
+1
-3
+1
-3
@@ -5,7 +5,6 @@ from sql import Null
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pyson import If, Equal, Eval, Not, In
|
||||
from trytond.transaction import Transaction
|
||||
from trytond import backend
|
||||
|
||||
__all__ = ['OrderPoint']
|
||||
|
||||
@@ -124,12 +123,11 @@ class OrderPoint(ModelSQL, ModelView):
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TableHandler = backend.get('TableHandler')
|
||||
cursor = Transaction().connection.cursor()
|
||||
sql_table = cls.__table__()
|
||||
|
||||
# Migration from 2.2
|
||||
table = TableHandler(cls, module_name)
|
||||
table = cls.__table_handler__(module_name)
|
||||
table.drop_constraint('check_min_max_quantity')
|
||||
# Migration from 4.2
|
||||
table.drop_constraint('check_max_qty_greater_min_qty')
|
||||
|
||||
Reference in new issue
Block a user