Fix tablehandler

This commit is contained in:
Sergio Morillo 2022-02-14 12:32:45 +01:00
parent 7f6e42b2e7
commit 6c8d7245d3
1 changed files with 3 additions and 3 deletions

View File

@ -171,8 +171,8 @@ class ConfigurationProposeDropEndDate(ModelSQL, CompanyValueMixin):
@classmethod
def __register__(cls, module_name):
TableHandler = backend.get('TableHandler')
table = TableHandler(cls, module_name)
TableHandler = backend.TableHandler
table_h = cls.__table_handler__(module_name)
cursor = Transaction().connection.cursor()
old_table = 'stock_configuration_propose_drop_end_date'
@ -186,7 +186,7 @@ class ConfigurationProposeDropEndDate(ModelSQL, CompanyValueMixin):
sql_table.id,
where=sql_table.propose_drop_end_date == True))
values = [r[0] for r in cursor.fetchall()]
table.drop_column('propose_drop_end_date')
table_h.drop_column('propose_drop_end_date')
super().__register__(module_name)