Remove migrations previous to 5.0.

This commit is contained in:
Albert Cervera i Areny 2023-05-07 12:09:03 +02:00
parent 37a69d9711
commit 620836081e

View file

@ -4,7 +4,6 @@ from trytond import backend
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
from trytond.pool import Pool
from trytond.pyson import Eval, Id
from trytond.tools.multivalue import migrate_property
from trytond.modules.company.model import (
CompanyMultiValueMixin, CompanyValueMixin)
@ -42,24 +41,6 @@ class ConfigurationWorkSequence(ModelSQL, CompanyValueMixin):
[Eval('company', -1), None]),
], depends=['company'])
@classmethod
def __register__(cls, module_name):
exist = backend.TableHandler.table_exist(cls._table)
super(ConfigurationWorkSequence, cls).__register__(module_name)
if not exist:
cls._migrate_property([], [], [])
@classmethod
def _migrate_property(cls, field_names, value_names, fields):
field_names.append('work_sequence')
value_names.append('work_sequence')
fields.append('company')
migrate_property(
'work.configuration', field_names, cls, value_names,
fields=fields)
@classmethod
def default_work_sequence(cls):
pool = Pool()