diff --git a/complaint.py b/complaint.py index 3bad7ca798..d2fd85aaf9 100644 --- a/complaint.py +++ b/complaint.py @@ -7,7 +7,6 @@ from trytond.model import ModelSQL, ModelView, Workflow, fields from trytond.pyson import Eval, If, Bool from trytond.pool import Pool from trytond.transaction import Transaction -from trytond import backend from trytond.modules.product import price_digits @@ -140,8 +139,7 @@ class Complaint(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/sale.py b/sale.py index b58fd52a69..7e305ba263 100644 --- a/sale.py +++ b/sale.py @@ -48,7 +48,7 @@ class ConfigurationSequence(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('complaint_sequence') super(ConfigurationSequence, cls).__register__(module_name)