Files
suite/project_task_line/migrations/17.0.1.0.0/pre-migration.py
2024-10-24 13:37:46 +00:00

15 lines
331 B
Python

def migrate(cr, installed_version):
cr.execute(
"""
ALTER TABLE project_task_line
ADD COLUMN IF NOT EXISTS state VARCHAR
""",
)
cr.execute(
"""
UPDATE project_task_line
SET state = kanban_state
WHERE kanban_state IN ('done', 'blocked')
""",
)