From d9a4e32d5b0397a07e30ba8855346606d9195cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 24 Jul 2018 22:01:08 +0200 Subject: [PATCH] Add __table_handler__ to ModelSQL issue7581 review48531002 --- order_point.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/order_point.py b/order_point.py index 5b42733c45..cc92bd01a5 100644 --- a/order_point.py +++ b/order_point.py @@ -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')