Skip to content

Commit

Permalink
[OU-ADD] website_hr_recruitment: Migration scripts
Browse files Browse the repository at this point in the history
The column hr.job>job_details requires to be pre-created for not
having it with wrong defaults for existing jobs.

TT45243
  • Loading branch information
pedrobaeza committed Mar 7, 2024
1 parent 6e20179 commit 15a9579
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_google_map |Nothing to do | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_hr_recruitment | Nothing to do | |
| website_hr_recruitment | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| website_jitsi | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(env.cr, "ALTER TABLE hr_job ADD job_details TEXT")
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---Models in module 'website_hr_recruitment'---
---Fields in module 'website_hr_recruitment'---
website_hr_recruitment / hr.job / job_details (html) : NEW hasdefault: default

# NOTHING TO DO: execute by ORM
# DONE: pre-migration: Pre-create column for avoiding the default

---XML records in module 'website_hr_recruitment'---
NEW ir.actions.act_window: website_hr_recruitment.action_job_pages_list
Expand All @@ -15,5 +14,4 @@ NEW ir.ui.view: website_hr_recruitment.job_pages_tree_view
NEW ir.ui.view: website_hr_recruitment.snippet_options
DEL ir.ui.view: website_hr_recruitment.job_edit_options
DEL ir.ui.view: website_hr_recruitment.user_navbar_inherit_website_hr_recruitment

# NOTHING TO DO

0 comments on commit 15a9579

Please sign in to comment.