From c744e91f4eb5818edef9413095ab756eb7daafb2 Mon Sep 17 00:00:00 2001 From: zhouzhou <123@qq.com> Date: Sat, 16 Nov 2024 17:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/__manifest__.py | 6 +- .../data/attendance_code_data.xml | 7 ++ yuthon_hr_attendance/models/__init__.py | 5 +- yuthon_hr_attendance/models/card_approval.py | 2 +- yuthon_hr_attendance/models/duty_approval.py | 2 +- yuthon_hr_attendance/models/go_approval.py | 2 +- .../models/overtime_approval.py | 2 +- .../models/remove_holiday_approval.py | 2 +- .../models/yuthon_adjustments_approval.py | 39 +++++++ .../models/yuthon_duty_arrangement.py | 49 +++++++++ .../models/yuthon_duty_setting.py | 8 ++ .../models/yuthon_duty_summary.py | 19 ++++ .../report/duty_summary_report.xml | 5 + .../security/ir.model.access.csv | 4 + yuthon_hr_attendance/views/card_approval.xml | 9 +- yuthon_hr_attendance/views/duty_approval.xml | 4 +- yuthon_hr_attendance/views/go_approval.xml | 4 +- .../views/overtime_approval.xml | 4 +- .../views/remove_holiday_approval.xml | 6 +- .../yuthon_adjustments_approval_views.xml | 51 +++++++++ .../views/yuthon_duty_arrangement_views.xml | 102 ++++++++++++++++++ .../views/yuthon_duty_setting_views.xml | 30 ++++++ .../views/yuthon_duty_summary_views.xml | 41 +++++++ yuthon_hr_employee/__manifest__.py | 1 + .../hr_job_company_security_group.xml | 12 +++ .../models/yuthon_appointment_approval.py | 2 +- .../models/yuthon_interview_approval.py | 2 +- .../models/yuthon_leaving_approval.py | 6 +- .../models/yuthon_message_login.py | 2 +- .../models/yuthon_onboard_approval.py | 2 +- .../models/yuthon_prepare_approval.py | 2 +- .../models/yuthon_reassignment_approval.py | 2 +- .../models/yuthon_recruitment_approval.py | 2 +- .../models/yuthon_regularization_approval.py | 2 +- .../models/yuthon_reward_approval.py | 2 +- .../models/yuthon_service_approval.py | 2 +- .../models/yuthon_transfer_approval.py | 2 +- .../report/meeting_minutes_report.xml | 3 - yuthon_work_brand/views/hr_menus.xml | 24 ++++- 39 files changed, 424 insertions(+), 47 deletions(-) create mode 100644 yuthon_hr_attendance/models/yuthon_adjustments_approval.py create mode 100644 yuthon_hr_attendance/models/yuthon_duty_arrangement.py create mode 100644 yuthon_hr_attendance/models/yuthon_duty_setting.py create mode 100644 yuthon_hr_attendance/models/yuthon_duty_summary.py create mode 100644 yuthon_hr_attendance/report/duty_summary_report.xml create mode 100644 yuthon_hr_attendance/views/yuthon_adjustments_approval_views.xml create mode 100644 yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml create mode 100644 yuthon_hr_attendance/views/yuthon_duty_setting_views.xml create mode 100644 yuthon_hr_attendance/views/yuthon_duty_summary_views.xml create mode 100644 yuthon_hr_employee/security/hr_job_company_security_group.xml diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index e779d3dcd..384c47965 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -12,7 +12,7 @@ 'category': 'Human Resources/Attendances', 'sequence': 240, 'website': 'https://www.pengyuthon.com', - 'depends': ['hr_attendance', 'resource', 'base', 'hr', 'mail', 'soong_workflow','yuthon_issue','planning'], + 'depends': ['hr_attendance', 'resource', 'base', 'hr', 'mail', 'soong_workflow','yuthon_issue','planning','calendar'], 'data': [ 'security/ir.model.access.csv', # 'security/approval_attendance.xml', @@ -20,6 +20,10 @@ # 'views/inherit_hr_employee_views.xml', 'views/hr_attendance_views.xml', 'views/resource_calendar_leaves_views.xml', + 'views/yuthon_adjustments_approval_views.xml', + 'views/yuthon_duty_arrangement_views.xml', + 'views/yuthon_duty_summary_views.xml', + 'views/yuthon_duty_setting_views.xml', # 'views/attendance_iot_datas.xml', # 'views/attendance_iot_manager_views.xml', # 'views/attendance_iot_views.xml', diff --git a/yuthon_hr_attendance/data/attendance_code_data.xml b/yuthon_hr_attendance/data/attendance_code_data.xml index fb847d215..cd7995e74 100644 --- a/yuthon_hr_attendance/data/attendance_code_data.xml +++ b/yuthon_hr_attendance/data/attendance_code_data.xml @@ -41,4 +41,11 @@ ZB%(y)s%(month)s%(day)s 3 + + + 值班调休申请序号 + adjustments_approval + TX%(y)s%(month)s%(day)s + 3 + diff --git a/yuthon_hr_attendance/models/__init__.py b/yuthon_hr_attendance/models/__init__.py index 4ec4d0507..45b787a5c 100644 --- a/yuthon_hr_attendance/models/__init__.py +++ b/yuthon_hr_attendance/models/__init__.py @@ -22,6 +22,9 @@ from . import card_approval from . import planning_template_inherit from . import overtime_page from . import inherit_planning_role - +from . import yuthon_duty_summary +from . import yuthon_adjustments_approval +from . import yuthon_duty_arrangement +from . import yuthon_duty_setting diff --git a/yuthon_hr_attendance/models/card_approval.py b/yuthon_hr_attendance/models/card_approval.py index 542b7f979..d8d07e7cb 100644 --- a/yuthon_hr_attendance/models/card_approval.py +++ b/yuthon_hr_attendance/models/card_approval.py @@ -15,7 +15,7 @@ class CardApprovals(models.Model): code = fields.Char(string="编号",default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") reason_application = fields.Html(string="申请事由") replacement_time = fields.Datetime(string="补卡时间") diff --git a/yuthon_hr_attendance/models/duty_approval.py b/yuthon_hr_attendance/models/duty_approval.py index 79865fb67..6d3d5a8c9 100644 --- a/yuthon_hr_attendance/models/duty_approval.py +++ b/yuthon_hr_attendance/models/duty_approval.py @@ -16,7 +16,7 @@ class DutyApprovals(models.Model): department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") users_id = fields.Many2one('res.users', string="申请人",default=lambda self: self.env.user.id) duty_ids = fields.One2many('duty.approval.line','duty_id',string="值班人明细") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') reason_application = fields.Char(string="事由") related_issues_id = fields.Many2one('issue.library', string="关联议题") @api.depends('date_start', 'date_end') diff --git a/yuthon_hr_attendance/models/go_approval.py b/yuthon_hr_attendance/models/go_approval.py index 9757871b5..685898852 100644 --- a/yuthon_hr_attendance/models/go_approval.py +++ b/yuthon_hr_attendance/models/go_approval.py @@ -17,7 +17,7 @@ class GoApprovals(models.Model): department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") reason_application = fields.Char(string="事由") go_approval_ids = fields.One2many('go.approvals.line', 'go_approval_id', string="外出详情") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") @api.onchange('is_issues') diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index 421aa2856..efc9d7538 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -18,7 +18,7 @@ class OvertimeApprovals(models.Model): default=lambda self: self._default_user_lines()) reason_application = fields.Char(string="事由") department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') details = fields.Text(string="加班说明") related_issues_id = fields.Many2one('issue.library', string="关联议题") diff --git a/yuthon_hr_attendance/models/remove_holiday_approval.py b/yuthon_hr_attendance/models/remove_holiday_approval.py index 7245eb6bd..c8fd925b8 100644 --- a/yuthon_hr_attendance/models/remove_holiday_approval.py +++ b/yuthon_hr_attendance/models/remove_holiday_approval.py @@ -24,7 +24,7 @@ class RemoveHolidayApprovals(models.Model): date_start = fields.Datetime(string="开始时间", default=fields.Datetime.now) date_end = fields.Datetime(string="结束时间") reason_application = fields.Html(string="申请事由") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") @api.onchange('is_issues') diff --git a/yuthon_hr_attendance/models/yuthon_adjustments_approval.py b/yuthon_hr_attendance/models/yuthon_adjustments_approval.py new file mode 100644 index 000000000..34bbd0c2d --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_adjustments_approval.py @@ -0,0 +1,39 @@ +from odoo import api, fields, models, tools, _ +from datetime import datetime, time, timedelta +from odoo.exceptions import UserError + + +class YuthonAdjustmentsApproval(models.Model): + _name = 'yuthon.adjustments.approval' + _inherit = ['soong.workflow.mixin'] + _description = '值班调休审批' + _rec_name = 'name' + + yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") + name = fields.Char(string="标题") + code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('adjustments_approval')) + users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") + is_issues = fields.Boolean(string='是否上会') + related_issues_id = fields.Many2one('issue.library', string="关联议题") + reason_application = fields.Html(string="申请事由") + replacement_time = fields.Datetime(string="值班时间") + documents_ids = fields.Many2many('ir.attachment', string="附件") + active = fields.Boolean('Active', default=True, tracking=True) + + @api.onchange('is_issues') + def _onchange_is_issues(self): + if self.is_issues: + issue_id = self.env['issue.library'].create({'name': self.name}) + self.related_issues_id = issue_id.id + workflow_record_id = self.env["soong.workflow.record"].search( + [("res_model", "=", self._name), ("res_id", "=", self.id)]) + self.env['issue.library.approval.line'].create({ + 'issue_library_id': issue_id.id, + 'workflow_record_id': workflow_record_id.id, + 'approval_type': workflow_record_id.workflow_id.id, + 'code': self.code, + 'approval_date': fields.Datetime.now(), + }) + elif self.related_issues_id: + raise UserError("已经创建了相关的上会记录,不能取消勾选") \ No newline at end of file diff --git a/yuthon_hr_attendance/models/yuthon_duty_arrangement.py b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py new file mode 100644 index 000000000..0dcde4d31 --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py @@ -0,0 +1,49 @@ +from odoo import api, fields, models, tools, _ +from datetime import datetime, time, timedelta +from odoo.exceptions import UserError + + +class YuthonDutyArrangement(models.Model): + _name = 'yuthon.duty.arrangement' + _description = '值班安排' + _order = 'start_time desc' + _rec_name = 'employee_id' + + employee_id = fields.Many2one('hr.employee', string='员工', + domain=lambda self: [('department_id.name', '=', '仓储组')]) + start_time = fields.Datetime(string="开始时间") + end_time = fields.Datetime(string="结束时间") + remind = fields.Selection([('fifteen', '提醒-15分钟'), ('thirty', '提醒-30分钟'), ('one_hour', '提醒-1小时'), + ('two_hour', '提醒-2小时')], string='提醒') + remarks = fields.Text(string='备注') + is_photo = fields.Boolean(string='拍照回传1', compute='_compute_is_photo') + is_photo_two = fields.Boolean(string='拍照回传2', compute='_compute_is_photo') + is_photo_three = fields.Boolean(string='拍照回传3', compute='_compute_is_photo') + photo_id = fields.Many2one('documents.document', string="文件1") + photo_id_two = fields.Many2one('documents.document', string="文件2") + photo_id_three = fields.Many2one('documents.document', string="文件3") + duration = fields.Datetime(string='时长1') + duration_two = fields.Datetime(string='时长2') + duration_three = fields.Datetime(string='时长3') + is_abnormal = fields.Boolean(string='是否异常') + + @api.model_create_multi + def create(self, vals_list): + performance_records = super().create(vals_list) + for performance in performance_records: + self.env['yuthon.duty.summary'].create({ + 'employee_id': performance.employee_id.id, + 'duty_arrangement_id': performance.id, + }) + return performance_records + + @api.depends('duration', 'duration_two', 'duration_three') + def _compute_is_photo(self): + for record in self: + record.is_photo = bool(record.duration) + record.is_photo_two = bool(record.duration_two) + record.is_photo_three = bool(record.duration_three) + + @api.onchange('duration') + def bottom_auto_schedule(self): + pass \ No newline at end of file diff --git a/yuthon_hr_attendance/models/yuthon_duty_setting.py b/yuthon_hr_attendance/models/yuthon_duty_setting.py new file mode 100644 index 000000000..22664210d --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_duty_setting.py @@ -0,0 +1,8 @@ +from odoo import api, fields, models, tools, _ + + +class YuthonDutySetting(models.Model): + _name = 'yuthon.duty.setting' + _description = '值班说明配置' + + reason_application = fields.Html(string="说明") diff --git a/yuthon_hr_attendance/models/yuthon_duty_summary.py b/yuthon_hr_attendance/models/yuthon_duty_summary.py new file mode 100644 index 000000000..1ca592029 --- /dev/null +++ b/yuthon_hr_attendance/models/yuthon_duty_summary.py @@ -0,0 +1,19 @@ +from odoo import api, fields, models, tools, _ + + +class YuthonDutySummary(models.Model): + _name = 'yuthon.duty.summary' + _description = '值班汇总' + + employee_id = fields.Many2one('hr.employee', string='员工') + duty_weekdays = fields.Float(string='周一至周五值班次数') + subtotal_weekdays = fields.Float(string='小计') + duty_weekends = fields.Float(string='周六日值班次数(不调休)') + subtotal_weekends = fields.Float(string='小计') + duty_weekends_leave = fields.Float(string='周六日值班次数(调休)') + subtotal_weekends_leave = fields.Float(string='小计') + total_duty_shifts = fields.Float(string='值班合计') + holidays = fields.Float(string='节假日值班费(元)') + total = fields.Float(string='总合计') + remake = fields.Text(string='备注') + duty_arrangement_id = fields.Many2one('yuthon.duty.arrangement', string='关联值班安排') \ No newline at end of file diff --git a/yuthon_hr_attendance/report/duty_summary_report.xml b/yuthon_hr_attendance/report/duty_summary_report.xml new file mode 100644 index 000000000..8c2c0a537 --- /dev/null +++ b/yuthon_hr_attendance/report/duty_summary_report.xml @@ -0,0 +1,5 @@ + + + + \ 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 5b1d4a956..da31e6314 100644 --- a/yuthon_hr_attendance/security/ir.model.access.csv +++ b/yuthon_hr_attendance/security/ir.model.access.csv @@ -10,3 +10,7 @@ access_go_approvals_line,go.approvals.line,model_go_approvals_line,base.group_us access_overtime_user_line,overtime.user.line,model_overtime_user_line,base.group_user,1,1,1,1 access_duty_approval_line,duty.approval.line,model_duty_approval_line,base.group_user,1,1,1,1 access_overtime_page,overtime.page,model_overtime_page,base.group_user,1,1,1,1 +access_yuthon_duty_summary,yuthon.duty.summary,model_yuthon_duty_summary,base.group_user,1,1,1,1 +access_yuthon_adjustments_approval,yuthon.adjustments.approval,model_yuthon_adjustments_approval,base.group_user,1,1,1,1 +access_yuthon_duty_arrangement,yuthon.duty.arrangement,model_yuthon_duty_arrangement,base.group_user,1,1,1,1 +access_yuthon_duty_setting,yuthon.duty.setting,model_yuthon_duty_setting,base.group_user,1,1,1,1 diff --git a/yuthon_hr_attendance/views/card_approval.xml b/yuthon_hr_attendance/views/card_approval.xml index 5b7861707..8d5ef5b93 100644 --- a/yuthon_hr_attendance/views/card_approval.xml +++ b/yuthon_hr_attendance/views/card_approval.xml @@ -12,7 +12,6 @@ - card.approval.actions card.approval @@ -30,6 +29,8 @@ + + @@ -38,14 +39,8 @@ - - - - - - diff --git a/yuthon_hr_attendance/views/duty_approval.xml b/yuthon_hr_attendance/views/duty_approval.xml index 1d00136ad..73e2b7526 100644 --- a/yuthon_hr_attendance/views/duty_approval.xml +++ b/yuthon_hr_attendance/views/duty_approval.xml @@ -37,6 +37,7 @@ + @@ -53,9 +54,6 @@ - - - diff --git a/yuthon_hr_attendance/views/go_approval.xml b/yuthon_hr_attendance/views/go_approval.xml index d0d9468f8..f2af2ec52 100644 --- a/yuthon_hr_attendance/views/go_approval.xml +++ b/yuthon_hr_attendance/views/go_approval.xml @@ -38,6 +38,7 @@ + @@ -52,9 +53,6 @@ - - - diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml index ec6b4230e..87dc54d04 100644 --- a/yuthon_hr_attendance/views/overtime_approval.xml +++ b/yuthon_hr_attendance/views/overtime_approval.xml @@ -40,6 +40,7 @@ + @@ -57,9 +58,6 @@ - - - diff --git a/yuthon_hr_attendance/views/remove_holiday_approval.xml b/yuthon_hr_attendance/views/remove_holiday_approval.xml index a9b2c812c..aa454454d 100644 --- a/yuthon_hr_attendance/views/remove_holiday_approval.xml +++ b/yuthon_hr_attendance/views/remove_holiday_approval.xml @@ -35,17 +35,13 @@ + - - - - - diff --git a/yuthon_hr_attendance/views/yuthon_adjustments_approval_views.xml b/yuthon_hr_attendance/views/yuthon_adjustments_approval_views.xml new file mode 100644 index 000000000..7fd1f734d --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_adjustments_approval_views.xml @@ -0,0 +1,51 @@ + + + + yuthon.adjustments.approval.tree + yuthon.adjustments.approval + + + + + + + + + + + yuthon.adjustments.approval.form + yuthon.adjustments.approval + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + 调休审批 + yuthon.adjustments.approval + tree,form + +
+ diff --git a/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml b/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml new file mode 100644 index 000000000..b65409616 --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml @@ -0,0 +1,102 @@ + + + + yuthon.duty.arrangement.tree + yuthon.duty.arrangement + + +
+
+ + + + + + + + +
+
+
+ + yuthon.duty.arrangement.form + yuthon.duty.arrangement + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + yuthon.duty.arrangement.search + yuthon.duty.arrangement + + + + + + + + yuthon.duty.arrangement.calendar + yuthon.duty.arrangement + + + + + + + + 值班安排 + yuthon.duty.arrangement + tree,form,calendar,search + +
+ + + + diff --git a/yuthon_hr_attendance/views/yuthon_duty_setting_views.xml b/yuthon_hr_attendance/views/yuthon_duty_setting_views.xml new file mode 100644 index 000000000..41eda53ae --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_duty_setting_views.xml @@ -0,0 +1,30 @@ + + + + yuthon.duty.setting.tree + yuthon.duty.setting + + + + + + + + yuthon.duty.setting.form + yuthon.duty.setting + +
+ + + + + +
+
+
+ + 值班说明 + yuthon.duty.setting + tree,form + +
diff --git a/yuthon_hr_attendance/views/yuthon_duty_summary_views.xml b/yuthon_hr_attendance/views/yuthon_duty_summary_views.xml new file mode 100644 index 000000000..b11ee116b --- /dev/null +++ b/yuthon_hr_attendance/views/yuthon_duty_summary_views.xml @@ -0,0 +1,41 @@ + + + + yuthon.duty.summary.tree + yuthon.duty.summary + + + + + + + + + + + + + + + + + + 值班汇总打印 + yuthon.duty.summary + qweb-pdf + yuthon_hr_attendance.yuthon_duty_summary_report_template + yuthon_hr_attendance.yuthon_duty_summary_report_template + '%s-值班汇总'% + + report + + + 值班汇总 + yuthon.duty.summary + tree + + + + + + diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py index 0417339f6..b502f3194 100644 --- a/yuthon_hr_employee/__manifest__.py +++ b/yuthon_hr_employee/__manifest__.py @@ -21,6 +21,7 @@ 'data/publish_applicant_setting_data.xml', 'security/ir.model.access.csv', 'security/job_lv_security_group.xml', + 'security/hr_job_company_security_group.xml', 'views/yuthon_hr_employee_views.xml', 'views/yuthon_hr_department_views.xml', 'views/yuthon_job_lv_views.xml', diff --git a/yuthon_hr_employee/security/hr_job_company_security_group.xml b/yuthon_hr_employee/security/hr_job_company_security_group.xml new file mode 100644 index 000000000..1eeb7be81 --- /dev/null +++ b/yuthon_hr_employee/security/hr_job_company_security_group.xml @@ -0,0 +1,12 @@ + + + + 岗位编制公司过滤 + + [('yuthon_company', '=', user.employee_id.yuthon_company)] + + + + + + diff --git a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py index 69b63113b..deacb75d2 100644 --- a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py @@ -16,7 +16,7 @@ class YuthonAppointmentApproval(models.Model): entrant_illustrate = fields.Text(string="录入说明") documents_ids = fields.Many2many('documents.document', string="附件") appointment_result_ids = fields.One2many('yuthon.appointment.result.line', 'appointment_result_id', string="聘任结果") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") # 聘任结果 judge_team_leader = fields.Many2one('hr.employee', string="评审小组组长") diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py index 4f957ef17..cfd43fffe 100644 --- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py @@ -14,7 +14,7 @@ class YuthonInterviewApproval(models.Model): department_id = fields.Many2one("hr.department", string="应聘职务") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_interview_approval_code')) applicant_ids = fields.One2many('interview.approval.line', 'interview_approval_id', string='应聘面试信息') - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('tctj', '天投城建')], string="公司") related_issues_id = fields.Many2one('issue.library', string="关联议题") diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py index 7eeaeb28d..c8c5a8a78 100644 --- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py @@ -28,12 +28,12 @@ class YuthonLeavingApproval(models.Model): application_data = fields.Date(string="申请日期") notice_documents_ids= fields.Many2many('documents.document', string="辞职申请") resignation_reason = fields.Text(string="辞职原因") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") - is_leaving = fields.Boolean(string="同意离职", default=False) + is_leaving = fields.Boolean(string="同意离职") leaving_date = fields.Date(string="工作期限") handover_person = fields.Many2one("hr.employee", string="交接人") - is_handover = fields.Boolean(string="交接完成", default=False) + is_handover = fields.Boolean(string="交接完成") @api.onchange('is_issues') def _onchange_is_issues(self): diff --git a/yuthon_hr_employee_approval/models/yuthon_message_login.py b/yuthon_hr_employee_approval/models/yuthon_message_login.py index 9a3c3cb33..0687e47f7 100644 --- a/yuthon_hr_employee_approval/models/yuthon_message_login.py +++ b/yuthon_hr_employee_approval/models/yuthon_message_login.py @@ -80,7 +80,7 @@ class YuthonMessageLogin(models.Model): driving_license_validity = fields.Date(string='有效期') resignation_id = fields.Many2one('documents.document', string='离职证明') medical_exam_cost = fields.Float(string='体检费用(含乙肝)') - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") login_document_id = fields.Many2one('ir.attachment', string="简历附件") diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py index 7def9de4f..28ea821bf 100644 --- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py @@ -41,7 +41,7 @@ class YuthonOnboardApproval(models.Model): details_personal_information_form_id = fields.Many2one('yuthon.message.login', string="个人信息表详情") details_recruitment_needs_form_id = fields.Many2one('yuthon.recruitment.approval', string="招聘需求详情") details_interview_form_id = fields.Many2many('yuthon.interview.approval', string="面试详情") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") # 合同 contracted_status = fields.Selection([('first', '首' diff --git a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py index 663b5776d..c8761dfcc 100644 --- a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py @@ -13,7 +13,7 @@ class YuthonPrepareApproval(models.Model): department_id = fields.Many2one("hr.department", string="部门",) name = fields.Char(string='标题') reason = fields.Html(string="正文") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件') adjust_information_ids = fields.One2many('prepare.approval.line', 'prepare_approval_id', string="关联调整信息") diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py index af7e20b90..d7becd33b 100644 --- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py @@ -25,7 +25,7 @@ class YuthonReassignmentApproval(models.Model): place_of_work = fields.Char(string="工作地点") use_user_type = fields.Selection(related="employee_id.use_user_type", string="聘用形式") person_attributes = fields.Selection([('in', '编制内'), ('out', '编制外')], string="人员属性") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") #异动信息 diff --git a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py index 038f3cbe6..205fab788 100644 --- a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py @@ -14,7 +14,7 @@ class YuthonRecruitmentApproval(models.Model): code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_recruitment_approval_code')) reason = fields.Html(string="正文") recruitment_ids = fields.One2many('hr.job', 'recruitment_approval_id', string="招聘申请") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件') diff --git a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py index df3cc5755..72eed2730 100644 --- a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py @@ -22,7 +22,7 @@ class YuthonRegularizationPrepareApproval(models.Model): trial_end_date = fields.Date(string="试用期结束日期") parent_id = fields.Many2one(related='employee_id.parent_id',string="直线上级") business_leader = fields.Char(string="业务线上级") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") # 转正考核 job_coach = fields.Char(string="工作指导人一") diff --git a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py index e6713834e..b4b2f394b 100644 --- a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py @@ -17,7 +17,7 @@ class YuthonRewardApproval(models.Model): entrant_date = fields.Date(string="录入日期") entrant_illustrate = fields.Text(string="录入说明") notice_documents_ids = fields.Many2many('documents.document', string="附件") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") reward_results_ids = fields.One2many('yuthon.reward.punishment.details', 'reward_punishment_id', string="奖罚明细") diff --git a/yuthon_hr_employee_approval/models/yuthon_service_approval.py b/yuthon_hr_employee_approval/models/yuthon_service_approval.py index 3d312d2ac..ebf79e795 100644 --- a/yuthon_hr_employee_approval/models/yuthon_service_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_service_approval.py @@ -17,7 +17,7 @@ class YuthonServiceApproval(models.Model): job_id = fields.Many2one('hr.job', string="岗位") reason_issuance = fields.Char(string="开证原因") issue_text = fields.Html(string="正文") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") @api.onchange('is_issues') diff --git a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py index ffeabfeff..190350cfc 100644 --- a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py @@ -27,7 +27,7 @@ class YutransferApproval(models.Model): notification_change_id = fields.Many2one("hr.employee", string="告知人员") handover_reason = fields.Text(string="移交原因") notice_documents_ids = fields.Many2many('documents.document', string="附件") - is_issues = fields.Boolean(string='是否上会', default=False) + is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") transfer_ids = fields.One2many('yuthon.transfer.infor.detail.lines', 'transfer_id') diff --git a/yuthon_issue/report/meeting_minutes_report.xml b/yuthon_issue/report/meeting_minutes_report.xml index 1eea3c420..cd6a5c5f9 100644 --- a/yuthon_issue/report/meeting_minutes_report.xml +++ b/yuthon_issue/report/meeting_minutes_report.xml @@ -43,8 +43,5 @@ - - - \ 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 a98fdf2dc..f1c079455 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -396,10 +396,20 @@ parent="hr_attendance_root_board" action="hr_attendance.hr_attendance_action" sequence="4"/> + + + sequence="15"/> + + sequence="99"/> +