Merge lp:~pedro.baeza/openupgrade-addons/7.0-hr_holidays into lp:openupgrade-addons

Proposed by Pedro Manuel Baeza
Status: Merged
Merged at revision: 8160
Proposed branch: lp:~pedro.baeza/openupgrade-addons/7.0-hr_holidays
Merge into: lp:openupgrade-addons
Diff against target: 109 lines (+95/-0)
3 files modified
hr_holidays/migrations/7.0.1.5/openupgrade_analysis_work.txt (+60/-0)
hr_holidays/migrations/7.0.1.5/pre-migration.py (+32/-0)
hr_holidays/migrations/7.0.1.5/user_notes.txt (+3/-0)
To merge this branch: bzr merge lp:~pedro.baeza/openupgrade-addons/7.0-hr_holidays
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Stefan Rijnhart (Opener) Needs Fixing
Review via email: mp+208926@code.launchpad.net

Description of the change

[ADD] hr_holidays: Partial migration script

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Pedro, can you please indicate in the code what is left to do?

review: Needs Information
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Stefan, it's indicated in openupgrade_analysis_work.txt. It's a minor issue, because a security group has been remove. Possible migration step can be to assign users belonging to that group to another of the remaining groups (or the new one created). It's not critical and with multiple possibilities. How do you think it's must be done?

Regards.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

You mean the change in ir.rule? This change only reflects that in OpenERP 7.0, the manager group inherits from the user group so that the rule applies to the manager automatically. Apart from that, this particular rule only adds groups instead of overwriting them, so effectively the manager group will remain linked to the rule which is harmless. So you can remove this TODO.

I was thinking more of converting crm.case.categ to crm.meeting.type in hr.holidays.status' categ_id field but I see that the crm.case.categ model remains in OpenERP 7.0, just not in this module. So there is no logical migration path for this setting. The impact however, is very small.

It would be nice if you could note this in a file called user_notes.txt though, saying that the optional meeting types that can be configured on leave types are reset during the upgrade and may need to be reconfigured.

review: Needs Fixing
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Agreed with Stefan

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the comments.

I have added user_notes.txt to explain categ_id change, and remove TODO.

Regards.

Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'hr_holidays/migrations/7.0.1.5/openupgrade_analysis_work.txt'
--- hr_holidays/migrations/7.0.1.5/openupgrade_analysis_work.txt 1970-01-01 00:00:00 +0000
+++ hr_holidays/migrations/7.0.1.5/openupgrade_analysis_work.txt 2014-03-27 18:51:21 +0000
@@ -0,0 +1,60 @@
1---Fields in module 'hr_holidays'---
2hr_holidays / hr.employee / last_login (datetime) : module is now 'hr' ('hr_holidays')
3### -> hr is a dependency, so this is not a problem
4
5hr_holidays / hr.holidays / case_id (many2one) : DEL relation: crm.meeting
6hr_holidays / hr.holidays / meeting_id (many2one) : NEW relation: crm.meeting
7### -> just renamed
8
9hr_holidays / hr.holidays / message_ids (one2many) : NEW relation: mail.message
10### -> new functionality of mail module: nothing to do.
11
12hr_holidays / hr.holidays.status / categ_id (many2one) : relation is now 'crm.meeting.type' ('crm.case.categ')
13### -> TODO: No easy migration path. Put a note in users_notes.txt
14
15---XML records in module 'hr_holidays'---
16NEW ir.actions.act_window: hr_holidays.act_hr_leave_request_to_meeting
17NEW ir.actions.act_window: hr_holidays.request_approve_allocation
18DEL ir.actions.act_window: hr_holidays.action_view_holiday_status_manager_board
19NEW ir.actions.act_window.view: hr_holidays.action_request_approve_allocation_form
20NEW ir.actions.act_window.view: hr_holidays.action_request_approve_allocation_tree
21### -> New act_window: Nothing to do
22
23NEW ir.actions.todo: base.open_menu
24DEL ir.actions.todo: hr_holidays.hr_holidays_leaves_assign_form_view_todo
25### -> New configuration wizards: Nothing to do
26
27NEW ir.model.access: hr_holidays.access_crm_meeting_type_manager
28NEW ir.model.access: hr_holidays.access_resource_calendar_leaves_user
29DEL ir.model.access: hr_holidays.access_resource_calendar_leaves_manager
30NEW ir.rule: hr_holidays.property_rule_holidays_officer
31DEL ir.rule: hr_holidays.property_rule_holidays_manager
32### -> Change of rules and access. Nothing to do
33
34NEW ir.ui.menu: hr_holidays.menu_request_approve_allocation
35DEL ir.ui.menu: hr_holidays.menu_hr_reporting_holidays
36### -> New menus: Nothing to do
37
38DEL ir.ui.view: hr_holidays.board_hr_holidays_manager_form
39### -> New view: Nothing to do
40
41NEW mail.message: hr_holidays.module_install_notification
42NEW mail.message.subtype: hr_holidays.mt_holidays_approved
43NEW mail.message.subtype: hr_holidays.mt_holidays_confirmed
44NEW mail.message.subtype: hr_holidays.mt_holidays_refused
45### -> New messages from chatter: Nothing to do
46
47NEW workflow.transition: hr_holidays.holiday_confirm2refuse
48NEW workflow.transition: hr_holidays.holiday_confirm2validate
49NEW workflow.transition: hr_holidays.holiday_confirm2validate1
50NEW workflow.transition: hr_holidays.holiday_draft2confirm
51NEW workflow.transition: hr_holidays.holiday_validate1_refuse
52NEW workflow.transition: hr_holidays.holiday_validate1_validate
53NEW workflow.transition: hr_holidays.holiday_validate2refuse
54DEL workflow.transition: hr_holidays.t1
55DEL workflow.transition: hr_holidays.t11
56DEL workflow.transition: hr_holidays.t2
57DEL workflow.transition: hr_holidays.t3
58DEL workflow.transition: hr_holidays.t4
59DEL workflow.transition: hr_holidays.t8
60### -> New conditions for jump between activities: Nothing to do
061
=== added file 'hr_holidays/migrations/7.0.1.5/pre-migration.py'
--- hr_holidays/migrations/7.0.1.5/pre-migration.py 1970-01-01 00:00:00 +0000
+++ hr_holidays/migrations/7.0.1.5/pre-migration.py 2014-03-27 18:51:21 +0000
@@ -0,0 +1,32 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# This migration script copyright (C) 2014
6# Pedro M. Baeza (pedro.baeza@serviciosbaeza.com)
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22from openupgrade import openupgrade
23
24column_renames = {
25 'hr_holidays': [
26 ('case_id', 'meeting_id'),
27 ]
28}
29
30@openupgrade.migrate()
31def migrate(cr, version):
32 openupgrade.rename_columns(cr, column_renames)
033
=== added file 'hr_holidays/migrations/7.0.1.5/user_notes.txt'
--- hr_holidays/migrations/7.0.1.5/user_notes.txt 1970-01-01 00:00:00 +0000
+++ hr_holidays/migrations/7.0.1.5/user_notes.txt 2014-03-27 18:51:21 +0000
@@ -0,0 +1,3 @@
1*******************************************************************************
21/ Optional meeting types that can be configured on leave types are reset
3 during the upgrade and may need to be reconfigured.

Subscribers

People subscribed via source and target branches