From 2bb1342a334ae9f93e9ac03ce569b93f887af1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 14 Jan 2026 21:22:56 +0800 Subject: [PATCH] 1 --- yuthon_hr_attendance/__manifest__.py | 3 +- yuthon_hr_attendance/models/__init__.py | 1 + .../models/yuthon_holiday_statement.py | 25 +++++++++++++++++ .../security/ir.model.access.csv | 3 +- .../views/all_attendance_menu.xml | 12 -------- .../views/yuthon_holiday_statement.xml | 24 ++++++++++++++++ ....report.xml => yuthon_overtime_report.xml} | 7 +---- yuthon_work_brand/views/hr_menus.xml | 28 +++++++++++++++++++ 8 files changed, 83 insertions(+), 20 deletions(-) create mode 100644 yuthon_hr_attendance/models/yuthon_holiday_statement.py create mode 100644 yuthon_hr_attendance/views/yuthon_holiday_statement.xml rename yuthon_hr_attendance/views/{yuthon.overtime.report.xml => yuthon_overtime_report.xml} (86%) diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index a14650f01..e83b12547 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -64,7 +64,8 @@ 'views/hr_attendance_portal_templates.xml', 'views/meal_approval.xml', 'views/applet_address_views.xml', - 'views/yuthon.overtime.report.xml', + 'views/yuthon_overtime_report.xml', + 'views/yuthon_holiday_statement.xml', 'views/all_attendance_menu.xml', 'views/overtime_approval_inherit_header.xml', diff --git a/yuthon_hr_attendance/models/__init__.py b/yuthon_hr_attendance/models/__init__.py index 84767ebfd..1efbdd0f0 100644 --- a/yuthon_hr_attendance/models/__init__.py +++ b/yuthon_hr_attendance/models/__init__.py @@ -33,6 +33,7 @@ from . import back_approval from . import staff_dining_report from . import message_reminder_tasks from . import yuthon_overtime_report +from . import yuthon_holiday_statement # 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 new file mode 100644 index 000000000..3f304898a --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_holiday_statement.py @@ -0,0 +1,25 @@ +from odoo import api, fields, models, tools, _ +from datetime import datetime, time, timedelta +from odoo.exceptions import UserError +from datetime import date, timedelta + +class HolidayStatement(models.Model): + _name = 'yuthon.holiday.statement' + _description = '请假扣款' + + leave_approval_type = fields.Char(string="审批类型") + gender = fields.Selection([('male', '男'),('female', '女'),], string='性别', required=True, default='male') + leave_title = fields.Char(string="标题") + leave_summary = fields.Char(string="摘要") + employee_id = fields.Many2one('hr.employee', string="发起人") + leave_start_date = fields.Char(string="开始时间") + leave_end_date = fields.Char(string="结束时间") + leave_duration = fields.Char(string="请假时长") + leave_stats = fields.Char(string="请假统计") + application_reason = fields.Char(string="申请原因") + leave_start_time = fields.Datetime(string="发起时间") + leave_end_time = fields.Datetime(string="最后操作时间") + approval_state = fields.Selection([ + ('approved', '通过'), + ('rejected', '未通过') + ], string='审批状态') \ No newline at end of file diff --git a/yuthon_hr_attendance/security/ir.model.access.csv b/yuthon_hr_attendance/security/ir.model.access.csv index ab8aa2057..b75b189e9 100644 --- a/yuthon_hr_attendance/security/ir.model.access.csv +++ b/yuthon_hr_attendance/security/ir.model.access.csv @@ -83,4 +83,5 @@ access_message_reminder_tasks,message.reminder.tasks,model_message_reminder_task access_applet_security_quick_perm_wizard,access_applet_security_quick_perm_wizard,model_applet_security_quick_perm_wizard,base.group_user,1,1,1,1 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 \ No newline at end of file +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 diff --git a/yuthon_hr_attendance/views/all_attendance_menu.xml b/yuthon_hr_attendance/views/all_attendance_menu.xml index 8b9a3c509..620d0b59c 100644 --- a/yuthon_hr_attendance/views/all_attendance_menu.xml +++ b/yuthon_hr_attendance/views/all_attendance_menu.xml @@ -222,16 +222,4 @@ parent="menu_hr_attendance_approval_request" sequence="15" action="view_back_approval_action"/> - - - - - diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml new file mode 100644 index 000000000..a2010ff8c --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml @@ -0,0 +1,24 @@ + + + + yuthon.holiday.statement.tree + yuthon.holiday.statement + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yuthon_hr_attendance/views/yuthon.overtime.report.xml b/yuthon_hr_attendance/views/yuthon_overtime_report.xml similarity index 86% rename from yuthon_hr_attendance/views/yuthon.overtime.report.xml rename to yuthon_hr_attendance/views/yuthon_overtime_report.xml index c56c91e82..17c18a514 100644 --- a/yuthon_hr_attendance/views/yuthon.overtime.report.xml +++ b/yuthon_hr_attendance/views/yuthon_overtime_report.xml @@ -22,10 +22,5 @@ 加班费记录 yuthon.overtime.report tree - -

- 暂无加班费记录 -

-
- \ No newline at end of file + diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index f7e6b1b22..aec3d9352 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -1,5 +1,18 @@ + + + 请假报表 + yuthon.holiday.statement + tree + + +

+ 暂无请假记录 +

+
+
+ + + + +