This commit is contained in:
李鹏宇
2026-01-14 21:22:56 +08:00
parent e3f8de9f7b
commit 2bb1342a33
8 changed files with 83 additions and 20 deletions
+2 -1
View File
@@ -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',
+1
View File
@@ -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
@@ -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='审批状态')
@@ -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
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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
83
84
85
86
87
@@ -222,16 +222,4 @@
parent="menu_hr_attendance_approval_request" sequence="15" action="view_back_approval_action"/>
<menuitem id="menu_hr_attendance_meal" name="报餐申请"
parent="menu_hr_attendance_approval_request" sequence="16" action="view_meal_approval_action"/>
<!-- 加班管理菜单 -->
<menuitem id="menu_yuthon_overtime_management_board"
name="加班管理"
parent="yuthon_attendance_planning_board"
sequence="18"/>
<menuitem id="menu_yuthon_overtime_report_board"
name="加班费记录"
parent="menu_yuthon_overtime_management_board"
action="action_yuthon_overtime_report"
sequence="5"/>
</odoo>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_yuthon_holiday_statement_tree" model="ir.ui.view">
<field name="name">yuthon.holiday.statement.tree</field>
<field name="model">yuthon.holiday.statement</field>
<field name="arch" type="xml">
<tree string="请假扣款列表" editable="bottom">
<field name="employee_id"/>
<field name="leave_approval_type"/>
<field name="gender"/>
<field name="leave_title"/>
<field name="leave_summary"/>
<field name="leave_start_date"/>
<field name="leave_end_date"/>
<field name="leave_duration"/>
<field name="leave_start_time"/>
<field name="leave_end_time"/>
<field name="leave_stats"/>
<field name="application_reason"/>
<field name="approval_state"/>
</tree>
</field>
</record>
</odoo>
@@ -22,10 +22,5 @@
<field name="name">加班费记录</field>
<field name="res_model">yuthon.overtime.report</field>
<field name="view_mode">tree</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
暂无加班费记录
</p>
</field>
</record>
</odoo>
</odoo>
+28
View File
@@ -1,5 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- 请假报表 action -->
<record id="action_yuthon_holiday_statement_work_brand" model="ir.actions.act_window">
<field name="name">请假报表</field>
<field name="res_model">yuthon.holiday.statement</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="yuthon_hr_attendance.view_yuthon_holiday_statement_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
暂无请假记录
</p>
</field>
</record>
<!-- 人力资源 -->
<menuitem id="human_resources_menu_root_board"
name="人力资源"
@@ -164,6 +177,21 @@
parent="hr_attendance_root_board_menu"
action="yuthon_hr_attendance.view_yuthon_vacation_reports_action"
sequence="14"/>
<menuitem id="holiday_overtime_report_menu_board"
name="加班报表"
parent="holiday_yuthon_vacation_reports_board"
sequence="1"/>
<menuitem id="menu_yuthon_overtime_report_board_work_brand"
name="加班费记录"
parent="holiday_overtime_report_menu_board"
action="yuthon_hr_attendance.action_yuthon_overtime_report"
sequence="5"/>
<menuitem id="menu_yuthon_holiday_statement_board"
name="请假报表"
parent="holiday_yuthon_vacation_reports_board"
action="action_yuthon_holiday_statement_work_brand"
sequence="2"/>
<!-- <menuitem id="staff_dining_report_board"-->
<!-- name="员工就餐收集表"-->
<!-- parent="hr_attendance_root_board_menu"-->