加班记录
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
'views/hr_attendance_portal_templates.xml',
|
||||
'views/meal_approval.xml',
|
||||
'views/applet_address_views.xml',
|
||||
'views/yuthon.overtime.report.xml',
|
||||
'views/all_attendance_menu.xml',
|
||||
'views/overtime_approval_inherit_header.xml',
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ from . import meal_approval
|
||||
from . import back_approval
|
||||
from . import staff_dining_report
|
||||
from . import message_reminder_tasks
|
||||
from . import yuthon_overtime_report
|
||||
|
||||
# from odoo.tools import SQL
|
||||
# import odoo
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
from odoo import api, fields, models, tools, _
|
||||
from datetime import datetime, time, timedelta
|
||||
from odoo.exceptions import UserError
|
||||
from datetime import date, timedelta
|
||||
|
||||
|
||||
class YuthonOvertimeReport(models.Model):
|
||||
_name = 'yuthon.overtime.report'
|
||||
_description = '加班费记录'
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string="员工")
|
||||
department_id = fields.Many2one('hr.department',string="部门")
|
||||
overtime_date = fields.Char(string="加班时间")
|
||||
carry_forward_date = fields.Date(string="结转日期")
|
||||
carry_forward_duration = fields.Float(string="结转时长")
|
||||
carry_forward_result = fields.Selection(
|
||||
selection=[
|
||||
('success', '成功'),
|
||||
('failed', '失败')
|
||||
],
|
||||
string='结转结果',
|
||||
)
|
||||
validity = fields.Char(string="有效期")
|
||||
carry_forward_state = fields.Selection(
|
||||
selection=[
|
||||
('pending', '待结转'),
|
||||
('completed', '已结转'),
|
||||
('partial', '部分结转')
|
||||
],
|
||||
string='结转状态',
|
||||
default='pending',
|
||||
)
|
||||
remaining_quantity = fields.Float(string='剩余数')
|
||||
|
||||
@@ -82,4 +82,5 @@ access_vacation_put_wizard,vacation.put.wizard,model_vacation_put_wizard,base.gr
|
||||
access_message_reminder_tasks,message.reminder.tasks,model_message_reminder_tasks,base.group_user,1,1,1,1
|
||||
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_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
|
||||
|
@@ -222,4 +222,16 @@
|
||||
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,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_overtime_report_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.overtime.report.tree</field>
|
||||
<field name="model">yuthon.overtime.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="加班费记录" editable="bottom">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="overtime_date"/>
|
||||
<field name="carry_forward_date"/>
|
||||
<field name="carry_forward_duration"/>
|
||||
<field name="carry_forward_result"/>
|
||||
<field name="carry_forward_state"/>
|
||||
<field name="remaining_quantity"/>
|
||||
<field name="validity"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 定义 action -->
|
||||
<record id="action_yuthon_overtime_report" model="ir.actions.act_window">
|
||||
<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>
|
||||
Reference in New Issue
Block a user