Add __table_handler__ to ModelSQL

issue7581
review48531002
This commit is contained in:
Cédric Krier
2018-07-24 22:01:07 +02:00
parent 1140cbd18c
commit a5c1dde783
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -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'):
+1 -1
View File
@@ -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'))