Skip to content

Commit cfbcd95

Browse files
authored
Merge pull request #2291 from Yasaie/13.0-mig-hr_timesheet
[13.0][MIG] hr_timesheet
2 parents 8b8c21a + 4e5c97c commit cfbcd95

File tree

4 files changed

+65
-1
lines changed

4 files changed

+65
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---Models in module 'hr_timesheet'---
2+
---Fields in module 'hr_timesheet'---
3+
hr_timesheet / account.analytic.account / project_count (integer) : module is now 'project' ('hr_timesheet')
4+
hr_timesheet / account.analytic.account / project_ids (one2many) : module is now 'project' ('hr_timesheet')
5+
hr_timesheet / project.project / analytic_account_id (many2one): module is now 'project' ('hr_timesheet')
6+
# NOTHING TO DO: Done on `project` module
7+
8+
---XML records in module 'hr_timesheet'---
9+
DEL ir.actions.act_window: hr_timesheet.project_task_action_view_timesheet
10+
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_employee_graph
11+
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_project_graph
12+
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_task_graph
13+
DEL ir.model.access: hr_timesheet.access_account_analytic_account_portal
14+
DEL ir.model.access: hr_timesheet.access_account_analytic_line_portal
15+
NEW ir.ui.view: hr_timesheet.portal_layout
16+
NEW ir.ui.view: hr_timesheet.portal_my_home_timesheet
17+
NEW ir.ui.view: hr_timesheet.portal_my_timesheets
18+
NEW ir.ui.view: hr_timesheet.portal_timesheet_table
19+
NEW ir.ui.view: hr_timesheet.view_hr_timesheet_line_graph
20+
DEL ir.ui.view: hr_timesheet.account_analytic_account_view_form_inherit
21+
NEW res.groups: hr_timesheet.group_hr_timesheet_approver
22+
# NOTHING TO DO: noupdate=0
23+
24+
NEW ir.module.category: base.module_category_operations_timesheets (noupdate)
25+
# NOTHING TO DO: New record
26+
27+
DEL ir.model.access: hr_timesheet.access_account_analytic_account_manager [renamed to project module]
28+
DEL ir.model.access: hr_timesheet.access_account_analytic_account_user [renamed to project module]
29+
DEL ir.model.access: hr_timesheet.access_account_analytic_line_project [renamed to project module]
30+
# NOTHING TO DO: Done in `project` module
31+
32+
DEL ir.rule: hr_timesheet.timesheet_rule_portal (noupdate)
33+
# DONE: post-migration removed
34+
35+
res.groups: hr_timesheet.group_timesheet_manager (noupdate switched)
36+
# DONE: pre-migration noupdate disabled
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2020 Payam Yasaie <https://www.tashilgostar.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
_unlink_by_xmlid = [
6+
'hr_timesheet.timesheet_rule_portal',
7+
]
8+
9+
10+
@openupgrade.migrate()
11+
def migrate(env, version):
12+
openupgrade.delete_records_safely_by_xml_id(env, _unlink_by_xmlid)
13+
openupgrade.load_data(env.cr, 'hr_timesheet', 'migrations/13.0.1.0/noupdate_changes.xml')
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2020 Payam Yasaie <https://www.tashilgostar.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
6+
@openupgrade.migrate()
7+
def migrate(env, version):
8+
openupgrade.set_xml_ids_noupdate_value(
9+
env,
10+
"hr_timesheet",
11+
[
12+
"group_timesheet_manager",
13+
],
14+
False,
15+
)

odoo/openupgrade/doc/source/modules120-130.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ missing in the new release are marked with |del|.
191191
+----------------------------------------------+-------------------------------------------------+
192192
| |new| hr_skills_survey | |
193193
+----------------------------------------------+-------------------------------------------------+
194-
|hr_timesheet | |
194+
|hr_timesheet | Done |
195195
+----------------------------------------------+-------------------------------------------------+
196196
|hr_timesheet_attendance | |
197197
+----------------------------------------------+-------------------------------------------------+

0 commit comments

Comments
 (0)