From 32a2816bff7ec46b619abbced4e1e6f4b83089f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 24 Jul 2018 22:01:07 +0200 Subject: [PATCH] Add __table_handler__ to ModelSQL issue7581 review48531002 --- payment.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/payment.py b/payment.py index 61f80d11ef..6bf815d211 100644 --- a/payment.py +++ b/payment.py @@ -9,7 +9,6 @@ from operator import attrgetter import stripe -from trytond import backend from trytond.model import ( ModelSQL, ModelView, Workflow, DeactivableMixin, fields) from trytond.pool import PoolMeta, Pool @@ -204,10 +203,9 @@ class Payment(metaclass=PoolMeta): @classmethod def __register__(cls, module_name): - TableHandler = backend.get('TableHandler') cursor = Transaction().connection.cursor() sql_table = cls.__table__() - table = TableHandler(cls, module_name) + table = cls.__table_handler__(module_name) idempotency_key_exist = table.column_exist('stripe_idempotency_key') super(Payment, cls).__register__(module_name)