From 9550da40e0250cc0b9ecae3b8d99471db4d598db 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 --- allocation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/allocation.py b/allocation.py index 1cbaa3bb83..d9631279d5 100644 --- a/allocation.py +++ b/allocation.py @@ -1,6 +1,5 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -from trytond import backend from trytond.model import ModelView, ModelSQL, fields from trytond.pool import Pool @@ -19,12 +18,11 @@ class Allocation(ModelSQL, ModelView): @classmethod def __register__(cls, module_name): - TableHandler = backend.get('TableHandler') - super(Allocation, cls).__register__(module_name) + table = cls.__table_handler__(module_name) + # Migration from 3.2: - table = TableHandler(cls, module_name) table.drop_constraint('percentage_positive') @staticmethod