From c82b3cf75821f53cb249c00fc5e8d0924072a7c1 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 --- user.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/user.py b/user.py index 67170ee944..6991fcafa4 100644 --- a/user.py +++ b/user.py @@ -20,7 +20,6 @@ from sql.conditionals import Coalesce from sql.functions import CurrentTimestamp from sql.operators import Equal -from trytond import backend from trytond.config import config from trytond.exceptions import RateLimitException from trytond.model import ( @@ -106,11 +105,9 @@ class User(DeactivableMixin, ModelSQL, ModelView): @classmethod def __register__(cls, module_name): - TableHandler = backend.get('TableHandler') - super(User, cls).__register__(module_name) - table_h = TableHandler(cls, module_name) + table_h = cls.__table_handler__(module_name) # Migration from 4.6 table_h.not_null_action('email', 'remove')