Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][MIG] hr_timesheet #2291

Merged
merged 1 commit into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---Models in module 'hr_timesheet'---
---Fields in module 'hr_timesheet'---
hr_timesheet / account.analytic.account / project_count (integer) : module is now 'project' ('hr_timesheet')
hr_timesheet / account.analytic.account / project_ids (one2many) : module is now 'project' ('hr_timesheet')
hr_timesheet / project.project / analytic_account_id (many2one): module is now 'project' ('hr_timesheet')
# NOTHING TO DO: Done on `project` module

---XML records in module 'hr_timesheet'---
DEL ir.actions.act_window: hr_timesheet.project_task_action_view_timesheet
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_employee_graph
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_project_graph
NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_task_graph
DEL ir.model.access: hr_timesheet.access_account_analytic_account_portal
DEL ir.model.access: hr_timesheet.access_account_analytic_line_portal
NEW ir.ui.view: hr_timesheet.portal_layout
NEW ir.ui.view: hr_timesheet.portal_my_home_timesheet
NEW ir.ui.view: hr_timesheet.portal_my_timesheets
NEW ir.ui.view: hr_timesheet.portal_timesheet_table
NEW ir.ui.view: hr_timesheet.view_hr_timesheet_line_graph
DEL ir.ui.view: hr_timesheet.account_analytic_account_view_form_inherit
NEW res.groups: hr_timesheet.group_hr_timesheet_approver
# NOTHING TO DO: noupdate=0

NEW ir.module.category: base.module_category_operations_timesheets (noupdate)
# NOTHING TO DO: New record

DEL ir.model.access: hr_timesheet.access_account_analytic_account_manager [renamed to project module]
DEL ir.model.access: hr_timesheet.access_account_analytic_account_user [renamed to project module]
DEL ir.model.access: hr_timesheet.access_account_analytic_line_project [renamed to project module]
# NOTHING TO DO: Done in `project` module

DEL ir.rule: hr_timesheet.timesheet_rule_portal (noupdate)
# DONE: post-migration removed

res.groups: hr_timesheet.group_timesheet_manager (noupdate switched)
# DONE: pre-migration noupdate disabled
13 changes: 13 additions & 0 deletions addons/hr_timesheet/migrations/13.0.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2020 Payam Yasaie <https://www.tashilgostar.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade

_unlink_by_xmlid = [
'hr_timesheet.timesheet_rule_portal',
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.delete_records_safely_by_xml_id(env, _unlink_by_xmlid)
openupgrade.load_data(env.cr, 'hr_timesheet', 'migrations/13.0.1.0/noupdate_changes.xml')
15 changes: 15 additions & 0 deletions addons/hr_timesheet/migrations/13.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2020 Payam Yasaie <https://www.tashilgostar.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.set_xml_ids_noupdate_value(
env,
"hr_timesheet",
[
"group_timesheet_manager",
],
False,
)
2 changes: 1 addition & 1 deletion odoo/openupgrade/doc/source/modules120-130.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ missing in the new release are marked with |del|.
+----------------------------------------------+-------------------------------------------------+
| |new| hr_skills_survey | |
+----------------------------------------------+-------------------------------------------------+
|hr_timesheet | |
|hr_timesheet | Done |
+----------------------------------------------+-------------------------------------------------+
|hr_timesheet_attendance | |
+----------------------------------------------+-------------------------------------------------+
Expand Down