[IMP] hr_payroll_timesheet: Migration script for 13

This commit is contained in:
Jared Kipe
2020-09-03 12:54:18 -07:00
parent e91aff862b
commit eb0ca4387d
3 changed files with 25 additions and 0 deletions

View File

@@ -1 +1,19 @@
from . import models
def ts_payroll_pre_init_hook(cr):
"""
This module installs a Work Entry Type with code "TS"
If you have undergone a migration (either for this module
or even your own Payslip Work Entry lines with code "TS")
then the uniqueness constraint will prevent this module
from installing.
"""
cr.execute("UPDATE hr_work_entry_type "
"SET code = 'TS-PRE-INSTALL' "
"WHERE code = 'TS';"
)
cr.execute("UPDATE hr_work_entry_type "
"SET code = 'TS_OT-PRE-INSTALL' "
"WHERE code = 'TS_OT';"
)