mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Init will run on install, even if the module existed in the prior version. Because these init scripts are intended to clear (and maybe even re-name back on actual init of data), records we should be more generic with the intended name. Additionally, if your database already had `hr_payroll_timesheet` based 'TS' work entry codes, then we cannot delete it if it is used on records like payslips (as a work type). Delete the link to simply stop using the old record, but leave it behind to keep it working.
16 lines
504 B
Python
Executable File
16 lines
504 B
Python
Executable File
from . import models
|
|
|
|
|
|
def attn_payroll_pre_init_hook(cr):
|
|
"""
|
|
This module installs a Work Entry Type with code "ATTN_OT"
|
|
If you have undergone a migration (either for this module
|
|
or even your own Payslip Work Entry lines with code "ATTN_OT")
|
|
then the uniqueness constraint will prevent this module
|
|
from installing.
|
|
"""
|
|
cr.execute("UPDATE hr_work_entry_type "
|
|
"SET code = 'ATTN_OT-PRE-INSTALL-14' "
|
|
"WHERE code = 'ATTN_OT';"
|
|
)
|