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):
|
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
|
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
|
then the uniqueness constraint will prevent this module
|
||||||
from installing.
|
from installing.
|
||||||
"""
|
"""
|
||||||
cr.execute("UPDATE hr_work_entry_type "
|
|
||||||
"SET code = 'ATTN-PRE-INSTALL' "
|
|
||||||
"WHERE code = 'ATTN';"
|
|
||||||
)
|
|
||||||
cr.execute("UPDATE hr_work_entry_type "
|
cr.execute("UPDATE hr_work_entry_type "
|
||||||
"SET code = 'ATTN_OT-PRE-INSTALL' "
|
"SET code = 'ATTN_OT-PRE-INSTALL' "
|
||||||
"WHERE code = 'ATTN_OT';"
|
"WHERE code = 'ATTN_OT';"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
'depends': [
|
'depends': [
|
||||||
'hr_payroll',
|
'hr_payroll',
|
||||||
'hr_attendance',
|
'hr_attendance',
|
||||||
|
'hr_attendance_work_entry',
|
||||||
'hr_payroll_overtime',
|
'hr_payroll_overtime',
|
||||||
],
|
],
|
||||||
'pre_init_hook': 'attn_payroll_pre_init_hook',
|
'pre_init_hook': 'attn_payroll_pre_init_hook',
|
||||||
|
|||||||
@@ -6,16 +6,10 @@
|
|||||||
<field name="name">Attendance Overtime</field>
|
<field name="name">Attendance Overtime</field>
|
||||||
<field name="code">ATTN_OT</field>
|
<field name="code">ATTN_OT</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="work_input_attendance" model="hr.work.entry.type">
|
|
||||||
<field name="name">Attendance</field>
|
<record id="hr_attendance_work_entry.work_input_attendance" model="hr.work.entry.type">
|
||||||
<field name="code">ATTN</field>
|
|
||||||
<field name="overtime_type_id" ref="hr_payroll_overtime.work_entry_overtime_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"/>
|
<field name="overtime_work_type_id" ref="work_input_attendance_overtime"/>
|
||||||
</record>
|
</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>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user