Skip to content

Commit

Permalink
[MIG] hr_hourly_cost: migrate 15 to 16
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenvietlam0640 committed Jul 3, 2023
1 parent 300336f commit 94ae90f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from openupgradelib import openupgrade

_renamed_fields = [
(
"hr.employee"
"hr_employee"
"timesheet_cost",
"hourly_cost",
),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env.cr, _fields_renames)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---Models in module 'hr_hourly_cost'---
---Fields in module 'hr_hourly_cost'---
hr_hourly_cost / hr.employee / currency_id (many2one) : previously in module hr_timesheet

# NOTHING TO DO

hr_hourly_cost / hr.employee / hourly_cost (float) : NEW hasdefault: default

# DONE: rename fields from timesheet_cost to hourly_cost in pre-migration

---XML records in module 'hr_hourly_cost'---
NEW ir.ui.view: hr_hourly_cost.view_employee_form

#NOTHING TO DO

0 comments on commit 94ae90f

Please sign in to comment.