[MIG] hr_attendance_work_entry: to Odoo 15.0

This commit is contained in:
Jared Kipe
2021-10-07 10:59:27 -07:00
parent b3cb28b174
commit 390784f726
4 changed files with 17 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
{ {
'name': 'Attendance Work Entry Type', 'name': 'Attendance Work Entry Type',
'description': 'Set work types on attendance records.', 'description': 'Set work types on attendance records.',
'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': 'AGPL-3', 'license': 'AGPL-3',
@@ -14,14 +14,20 @@
'data/hr_attendance_work_entry_data.xml', 'data/hr_attendance_work_entry_data.xml',
'views/attendance_views.xml', 'views/attendance_views.xml',
'views/employee_views.xml', 'views/employee_views.xml',
'views/web_assets.xml',
'views/work_entry_views.xml', 'views/work_entry_views.xml',
], ],
'demo': [ 'demo': [
'data/hr_attendance_work_entry_demo.xml', 'data/hr_attendance_work_entry_demo.xml',
], ],
'qweb': [ 'assets': {
'static/src/xml/hr_attendance.xml', 'web.assets_qweb': [
], 'hr_attendance_work_entry/static/src/xml/hr_attendance.xml',
],
'web.assets_backend': [
'hr_attendance_work_entry/static/src/js/kiosk_confirm.js',
'hr_attendance_work_entry/static/src/js/my_attendances.js',
'hr_attendance_work_entry/static/src/scss/hr_attendances.scss',
],
},
'pre_init_hook': 'attn_payroll_pre_init_hook', 'pre_init_hook': 'attn_payroll_pre_init_hook',
} }

View File

@@ -1,3 +1,4 @@
from time import sleep
from odoo.tests import common from odoo.tests import common
@@ -39,6 +40,9 @@ class TestAttendanceWorkType(common.TransactionCase):
self.assertEqual(attendance.work_type_id, break_type) self.assertEqual(attendance.work_type_id, break_type)
self.assertEqual(self.employee.attendance_state, 'break') self.assertEqual(self.employee.attendance_state, 'break')
# tests likely won't pass as the timestamps will be the same
sleep(1)
# check back in immediately with default # check back in immediately with default
self.employee = self.employee.with_context(work_type_id=self.default_work_type.id) self.employee = self.employee.with_context(work_type_id=self.default_work_type.id)
attendance = self.employee._attendance_action_change() attendance = self.employee._attendance_action_change()

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="assets_backend" name="hr_attendance_work_entry_assets" inherit_id="web.assets_backend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/hr_attendance_work_entry/static/src/js/kiosk_confirm.js"/>
<script type="text/javascript" src="/hr_attendance_work_entry/static/src/js/my_attendances.js"/>
</xpath>
<xpath expr="//link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/hr_attendance_work_entry/static/src/scss/hr_attendances.scss"/>
</xpath>
</template>
</odoo>

View File

@@ -30,7 +30,8 @@
<menuitem <menuitem
id="hr_work_entry_type_menu" id="hr_work_entry_type_menu"
name="Work Entry Types" name="Work Entry Types"
parent="hr_attendance.menu_hr_attendance_manage_attendances" parent="hr_attendance.menu_hr_attendance_root"
sequence="90"
action="hr_work_entry.hr_work_entry_type_action"/> action="hr_work_entry.hr_work_entry_type_action"/>
</odoo> </odoo>