mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'fix/14.0/hr_payroll_timesheet__migration_fix' into '14.0-test'
fix/14.0/hr_payroll_timesheet__migration_fix into 14.0-test See merge request hibou-io/hibou-odoo/suite!824
This commit is contained in:
@@ -10,6 +10,6 @@ def attn_payroll_pre_init_hook(cr):
|
||||
from installing.
|
||||
"""
|
||||
cr.execute("UPDATE hr_work_entry_type "
|
||||
"SET code = 'ATTN_OT-PRE-INSTALL' "
|
||||
"SET code = 'ATTN_OT-PRE-INSTALL-14' "
|
||||
"WHERE code = 'ATTN_OT';"
|
||||
)
|
||||
|
||||
@@ -10,6 +10,6 @@ def ts_payroll_pre_init_hook(cr):
|
||||
from installing.
|
||||
"""
|
||||
cr.execute("UPDATE hr_work_entry_type "
|
||||
"SET code = 'TS_OT-PRE-INSTALL' "
|
||||
"SET code = 'TS_OT-PRE-INSTALL-14' "
|
||||
"WHERE code = 'TS_OT';"
|
||||
)
|
||||
|
||||
19
hr_payroll_timesheet/migrations/14.0.0.0.1/pre-migration.py
Normal file
19
hr_payroll_timesheet/migrations/14.0.0.0.1/pre-migration.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
import odoo
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
"""
|
||||
In 13.0, we had our own work type:
|
||||
hr_payroll_timesheet.work_input_timesheet
|
||||
|
||||
This was moved to `hr_timesheet_work_entry`
|
||||
We will unlink the XML ref so that the record will be kept.
|
||||
"""
|
||||
env = odoo.api.Environment(cr, odoo.SUPERUSER_ID, {})
|
||||
xml_refs = env['ir.model.data'].search([
|
||||
('module', '=', 'hr_payroll_timesheet'),
|
||||
('name', '=', 'work_input_timesheet'),
|
||||
])
|
||||
xml_refs.unlink()
|
||||
@@ -10,6 +10,6 @@ def ts_work_type_pre_init_hook(cr):
|
||||
from installing.
|
||||
"""
|
||||
cr.execute("UPDATE hr_work_entry_type "
|
||||
"SET code = 'TS-PRE-INSTALL' "
|
||||
"SET code = 'TS-PRE-INSTALL-14' "
|
||||
"WHERE code = 'TS';"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user