mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[NEW] hr_attendance_work_entry: for Odoo 13
This commit is contained in:
@@ -3,16 +3,12 @@ from . import models
|
||||
|
||||
def attn_payroll_pre_init_hook(cr):
|
||||
"""
|
||||
This module installs a Work Entry Type with code "ATTN"
|
||||
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")
|
||||
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-PRE-INSTALL' "
|
||||
"WHERE code = 'ATTN';"
|
||||
)
|
||||
cr.execute("UPDATE hr_work_entry_type "
|
||||
"SET code = 'ATTN_OT-PRE-INSTALL' "
|
||||
"WHERE code = 'ATTN_OT';"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
'depends': [
|
||||
'hr_payroll',
|
||||
'hr_attendance',
|
||||
'hr_attendance_work_entry',
|
||||
'hr_payroll_overtime',
|
||||
],
|
||||
'pre_init_hook': 'attn_payroll_pre_init_hook',
|
||||
|
||||
@@ -6,16 +6,10 @@
|
||||
<field name="name">Attendance Overtime</field>
|
||||
<field name="code">ATTN_OT</field>
|
||||
</record>
|
||||
<record id="work_input_attendance" model="hr.work.entry.type">
|
||||
<field name="name">Attendance</field>
|
||||
<field name="code">ATTN</field>
|
||||
|
||||
<record id="hr_attendance_work_entry.work_input_attendance" model="hr.work.entry.type">
|
||||
<field name="overtime_type_id" ref="hr_payroll_overtime.work_entry_overtime_type"/>
|
||||
<field name="overtime_work_type_id" ref="work_input_attendance_overtime"/>
|
||||
</record>
|
||||
|
||||
<!-- Rename Stock "Attendance" type -->
|
||||
<record id="hr_work_entry.work_entry_type_attendance" model="hr.work.entry.type">
|
||||
<field name="name">Work Calendar</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user