changeset 9dc6040a744e in modules/customs:default
details: https://hg.tryton.org/modules/customs?cmd=changeset&node=9dc6040a744e
description:
        Use singleton for TableHandler

        issue11301
        review366861002
diffstat:

 product.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 2a9f96d4e0be -r 9dc6040a744e product.py
--- a/product.py        Mon May 02 16:53:18 2022 +0200
+++ b/product.py        Sat May 07 11:35:14 2022 +0200
@@ -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 ModelSQL, ModelView, fields, sequence_ordered
 from trytond.pool import Pool, PoolMeta
 from trytond.pyson import Bool, Eval, Or
@@ -118,7 +117,7 @@
         sql_table = cls.__table__()
         category = Category.__table__()
 
-        table = backend.TableHandler(cls, module_name)
+        table = cls.__table_handler__(module_name)
         category_exists = table.column_exist('category')
 
         super(Template, cls).__register__(module_name)

Reply via email to