Add __table_handler__ to ModelSQL
issue7581 review48531002
This commit is contained in:
1 parent
b2c333e961
commit
11ad2fcde6
2 files changed
+2
-4
No files matched your search
+1
-3
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user