Merge pull request !8023 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-01-15 10:56:59 +00:00
committed by Gitee
10 changed files with 51 additions and 10 deletions
+1
View File
@@ -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',
+2 -1
View File
@@ -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
@@ -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')
@@ -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="次数")
@@ -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="部门")
@@ -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
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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
84
85
86
87
88
@@ -4,7 +4,7 @@
<field name="name">yuthon.holiday.statement.tree</field>
<field name="model">yuthon.holiday.statement</field>
<field name="arch" type="xml">
<tree string="请假扣款列表" editable="bottom">
<tree string="请假情况" editable="bottom">
<field name="employee_id"/>
<field name="leave_approval_type"/>
<field name="gender"/>
@@ -22,7 +22,7 @@
</field>
</record>
<record id="view_yuthon_holiday_statement_action" model="ir.actions.act_window">
<field name="name">请假扣款列表</field>
<field name="name">请假情况</field>
<field name="res_model">yuthon.holiday.statement</field>
<field name="view_mode">tree</field>
</record>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_yuthon_meal_case_tree" model="ir.ui.view">
<field name="name">yuthon.meal.case.tree</field>
<field name="model">yuthon.meal.case</field>
<field name="arch" type="xml">
<tree string="误餐情况" editable="bottom">
<field name="employee_id"/>
<field name="number"/>
</tree>
</field>
</record>
<record id="view_yuthon_meal_case_action" model="ir.actions.act_window">
<field name="name">误餐情况</field>
<field name="res_model">yuthon.meal.case</field>
<field name="view_mode">tree</field>
</record>
</odoo>
@@ -4,7 +4,7 @@
<field name="name">yuthon.overtime.report.tree</field>
<field name="model">yuthon.overtime.report</field>
<field name="arch" type="xml">
<tree string="加班费记录" editable="bottom">
<tree string="加班情况" editable="bottom">
<field name="employee_id"/>
<field name="department_id"/>
<field name="overtime_date"/>
@@ -18,7 +18,7 @@
</field>
</record>
<record id="action_yuthon_overtime_report" model="ir.actions.act_window">
<field name="name">加班费记录</field>
<field name="name">加班情况</field>
<field name="res_model">yuthon.overtime.report</field>
<field name="view_mode">tree</field>
</record>
+8 -2
View File
@@ -166,15 +166,21 @@
sequence="14"/>
<menuitem id="menu_yuthon_overtime_report_board_work_brand"
name="加班报表"
name="加班情况"
parent="hr_attendance_root_board_menu"
action="yuthon_hr_attendance.action_yuthon_overtime_report"
sequence="15"/>
<menuitem id="menu_yuthon_holiday_statement_board"
name="请假报表"
name="请假情况"
parent="hr_attendance_root_board_menu"
action="yuthon_hr_attendance.view_yuthon_holiday_statement_action"
sequence="16"/>
<menuitem id="menu_yuthon_meal_case_board"
name="误餐情况"
parent="hr_attendance_root_board_menu"
action="yuthon_hr_attendance.view_yuthon_meal_case_action"
sequence="17"/>
<!-- <menuitem id="staff_dining_report_board"-->
<!-- name="员工就餐收集表"-->
<!-- parent="hr_attendance_root_board_menu"-->