diff --git a/asset.py b/asset.py index 717531d646..c41138a97f 100644 --- a/asset.py +++ b/asset.py @@ -16,7 +16,6 @@ from trytond.wizard import (Wizard, StateView, StateTransition, StateReport, Button) from trytond.tools import grouped_slice from trytond.modules.company import CompanyReport -from trytond import backend __all__ = ['Asset', 'AssetLine', 'AssetUpdateMove', 'CreateMovesStart', 'CreateMoves', @@ -210,8 +209,7 @@ class Asset(Workflow, ModelSQL, ModelView): @classmethod def __register__(cls, module_name): - TableHandler = backend.get('TableHandler') - table_h = TableHandler(cls, module_name) + table_h = cls.__table_handler__(module_name) # Migration from 3.8: rename reference into number if table_h.column_exist('reference'): diff --git a/product.py b/product.py index b6ee44e34a..6d6b2b58bc 100644 --- a/product.py +++ b/product.py @@ -76,7 +76,7 @@ class CategoryAccount(metaclass=PoolMeta): TableHandler = backend.get('TableHandler') exist = TableHandler.table_exist(cls._table) if exist: - table = TableHandler(cls, module_name) + table = cls.__table_handler__(module_name) exist &= (table.column_exist('account_depreciation') and table.column_exist('account_asset'))