Use direct access to backend classes

issue8836
review258421002
This commit is contained in:
Nicolas Évrard
2019-12-06 17:33:46 +01:00
parent 2e26369ef6
commit 8c4bdbbfa9
+1 -2
View File
@@ -110,14 +110,13 @@ class Template(metaclass=PoolMeta):
@classmethod
def __register__(cls, module_name):
TableHandler = backend.get('TableHandler')
cursor = Transaction().connection.cursor()
pool = Pool()
Category = pool.get('product.category')
sql_table = cls.__table__()
category = Category.__table__()
table = TableHandler(cls, module_name)
table = backend.TableHandler(cls, module_name)
category_exists = table.column_exist('category')
super(Template, cls).__register__(module_name)