diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index e83b12547..68cc0a169 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -26,6 +26,7 @@ 'report/go_approval_templates.xml', 'views/hr_attendance_views.xml', 'views/resource_calendar_leaves_views.xml', + 'views/yuthon_meal_case_view.xml', 'views/inherit_hr_employee.xml', 'views/inherit_planning_role_views.xml', 'views/inherit_planning_slot_views.xml', diff --git a/yuthon_hr_attendance/models/__init__.py b/yuthon_hr_attendance/models/__init__.py index 1efbdd0f0..a04f7efed 100644 --- a/yuthon_hr_attendance/models/__init__.py +++ b/yuthon_hr_attendance/models/__init__.py @@ -32,8 +32,9 @@ from . import meal_approval from . import back_approval from . import staff_dining_report from . import message_reminder_tasks -from . import yuthon_overtime_report +from . import yuthon_overtime_report from . import yuthon_holiday_statement +from . import yuthon_meal_case # from odoo.tools import SQL # import odoo diff --git a/yuthon_hr_attendance/models/yuthon_holiday_statement.py b/yuthon_hr_attendance/models/yuthon_holiday_statement.py index 3f304898a..cf838d605 100644 --- a/yuthon_hr_attendance/models/yuthon_holiday_statement.py +++ b/yuthon_hr_attendance/models/yuthon_holiday_statement.py @@ -5,7 +5,7 @@ from datetime import date, timedelta class HolidayStatement(models.Model): _name = 'yuthon.holiday.statement' - _description = '请假扣款' + _description = '请假情况' leave_approval_type = fields.Char(string="审批类型") gender = fields.Selection([('male', '男'),('female', '女'),], string='性别', required=True, default='male') diff --git a/yuthon_hr_attendance/models/yuthon_meal_case.py b/yuthon_hr_attendance/models/yuthon_meal_case.py new file mode 100644 index 000000000..b73de9fcd --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_meal_case.py @@ -0,0 +1,13 @@ +from odoo import api, fields, models, tools, _ +from datetime import datetime, time, timedelta +from odoo.exceptions import UserError +from datetime import date, timedelta + + +class YuthonMealCase(models.Model): + _name = 'yuthon.meal.case' + _description = '用餐情况' + + employee_id = fields.Many2one('hr.employee', string="员工") + number = fields.Integer(string="次数") + diff --git a/yuthon_hr_attendance/models/yuthon_overtime_report.py b/yuthon_hr_attendance/models/yuthon_overtime_report.py index 8137c7968..aaaf1134d 100644 --- a/yuthon_hr_attendance/models/yuthon_overtime_report.py +++ b/yuthon_hr_attendance/models/yuthon_overtime_report.py @@ -6,7 +6,7 @@ from datetime import date, timedelta class YuthonOvertimeReport(models.Model): _name = 'yuthon.overtime.report' - _description = '加班费记录' + _description = '加班情况' employee_id = fields.Many2one('hr.employee', string="员工") department_id = fields.Many2one('hr.department',string="部门") diff --git a/yuthon_hr_attendance/security/ir.model.access.csv b/yuthon_hr_attendance/security/ir.model.access.csv index b75b189e9..4f1819163 100644 --- a/yuthon_hr_attendance/security/ir.model.access.csv +++ b/yuthon_hr_attendance/security/ir.model.access.csv @@ -84,4 +84,5 @@ access_applet_security_quick_perm_wizard,access_applet_security_quick_perm_wizar access_vacation_reports_wizard,vacation.reports.wizard,model_vacation_reports_wizard,base.group_user,1,1,1,1 access_yuthon_overtime_report,access_yuthon_overtime_report,model_yuthon_overtime_report,base.group_user,1,1,1,1 -access_yuthon_holiday_statement,access_yuthon_holiday_statement,model_yuthon_holiday_statement,base.group_user,1,1,1,1 \ No newline at end of file +access_yuthon_holiday_statement,access_yuthon_holiday_statement,model_yuthon_holiday_statement,base.group_user,1,1,1,1 +access_yuthon_meal_case,access_yuthon_meal_case,model_yuthon_meal_case,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml index 1d0aa8852..7efe10385 100644 --- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml +++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml @@ -4,7 +4,7 @@ yuthon.holiday.statement.tree yuthon.holiday.statement - + @@ -22,7 +22,7 @@ - 请假扣款列表 + 请假情况 yuthon.holiday.statement tree diff --git a/yuthon_hr_attendance/views/yuthon_meal_case_view.xml b/yuthon_hr_attendance/views/yuthon_meal_case_view.xml new file mode 100644 index 000000000..cc70d110f --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_meal_case_view.xml @@ -0,0 +1,19 @@ + + + + yuthon.meal.case.tree + yuthon.meal.case + + + + + + + + + 误餐情况 + yuthon.meal.case + tree + + + diff --git a/yuthon_hr_attendance/views/yuthon_overtime_report.xml b/yuthon_hr_attendance/views/yuthon_overtime_report.xml index 8f2a0cc90..f651b3b07 100644 --- a/yuthon_hr_attendance/views/yuthon_overtime_report.xml +++ b/yuthon_hr_attendance/views/yuthon_overtime_report.xml @@ -4,7 +4,7 @@ yuthon.overtime.report.tree yuthon.overtime.report - + @@ -18,7 +18,7 @@ - 加班费记录 + 加班情况 yuthon.overtime.report tree diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index 4ef6a5fec..11395975f 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -166,15 +166,21 @@ sequence="14"/> + +