From 2ff711bf29f56df1fe7266232c864361d58b68af 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 --- work.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/work.py b/work.py index c6ca23d696..96c712b7bd 100644 --- a/work.py +++ b/work.py @@ -7,7 +7,6 @@ from sql import Null from trytond.model import ModelView, ModelSQL, fields, sequence_ordered, tree from trytond.pyson import Eval -from trytond import backend from trytond.transaction import Transaction from trytond.pool import Pool from trytond.tools import reduce_ids, grouped_slice @@ -120,10 +119,9 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView): @classmethod def __register__(cls, module_name): TimesheetWork = Pool().get('timesheet.work') - TableHandler = backend.get('TableHandler') cursor = Transaction().connection.cursor() - table_project_work = TableHandler(cls, module_name) - table_timesheet_work = TableHandler(TimesheetWork, module_name) + table_project_work = cls.__table_handler__(module_name) + table_timesheet_work = TimesheetWork.__table_handler__(module_name) project = cls.__table__() timesheet = TimesheetWork.__table__()