mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] hr_payroll_timesheet: to Odoo 15.0
This commit is contained in:
@@ -10,6 +10,6 @@ def ts_payroll_pre_init_hook(cr):
|
|||||||
from installing.
|
from installing.
|
||||||
"""
|
"""
|
||||||
cr.execute("UPDATE hr_work_entry_type "
|
cr.execute("UPDATE hr_work_entry_type "
|
||||||
"SET code = 'TS_OT-PRE-INSTALL-14' "
|
"SET code = 'TS_OT-PRE-INSTALL-15' "
|
||||||
"WHERE code = 'TS_OT';"
|
"WHERE code = 'TS_OT';"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'Timesheets on Payslips',
|
'name': 'Timesheets on Payslips',
|
||||||
'description': 'Get Timesheet hours onto Employee Payslips.',
|
'description': 'Get Timesheet hours onto Employee Payslips.',
|
||||||
'version': '14.0.1.0.0',
|
'version': '15.0.1.0.0',
|
||||||
'website': 'https://hibou.io/',
|
'website': 'https://hibou.io/',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'license': 'OPL-1',
|
'license': 'OPL-1',
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# 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()
|
|
||||||
@@ -156,7 +156,7 @@ class TestPayslipTimesheet(common.TestPayslip):
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.payslip.state = 'draft'
|
self.payslip.state = 'draft'
|
||||||
self.payslip._onchange_employee()
|
self.payslip.action_refresh_from_work_entries()
|
||||||
timesheet_line = self.payslip.worked_days_line_ids.filtered(lambda l: l.code == 'TS')
|
timesheet_line = self.payslip.worked_days_line_ids.filtered(lambda l: l.code == 'TS')
|
||||||
timesheet_overtime_line = self.payslip.worked_days_line_ids.filtered(lambda l: l.code == 'TS_OT')
|
timesheet_overtime_line = self.payslip.worked_days_line_ids.filtered(lambda l: l.code == 'TS_OT')
|
||||||
self.assertTrue(timesheet_line)
|
self.assertTrue(timesheet_line)
|
||||||
|
|||||||
Reference in New Issue
Block a user