Use direct access to backend classes

issue8836
review258421002
This commit is contained in:
Nicolas Évrard
2019-12-06 17:33:46 +01:00
parent 61be50ca85
commit 2a3da33576
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -34,8 +34,7 @@ class ConfigurationSepaMandateSequence(ModelSQL, CompanyValueMixin):
@classmethod
def __register__(cls, module_name):
TableHandler = backend.get('TableHandler')
exist = TableHandler.table_exist(cls._table)
exist = backend.TableHandler.table_exist(cls._table)
super(ConfigurationSepaMandateSequence, cls).__register__(module_name)
+1 -2
View File
@@ -699,7 +699,6 @@ class Message(Workflow, ModelSQL, ModelView):
@classmethod
def __register__(cls, module_name):
TableHandler = backend.get('TableHandler')
cursor = Transaction().connection.cursor()
pool = Pool()
Group = pool.get('account.payment.group')
@@ -707,7 +706,7 @@ class Message(Workflow, ModelSQL, ModelView):
super(Message, cls).__register__(module_name)
# Migration from 3.2
if TableHandler.table_exist(Group._table):
if backend.TableHandler.table_exist(Group._table):
group_table = Group.__table_handler__(module_name)
if group_table.column_exist('sepa_message'):
group = Group.__table__()