diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index ccc98614a..305e58667 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -127,8 +127,6 @@ class SoongWorkflowRecord(models.Model): for rec in self: if rec.node_id.flow_start: rec.approve_state = "start" - elif rec.node_id.flow_end: - rec.approve_state = "end" else: rec.approve_state = "pending" diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 13ed5588e..d3098bbf5 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -196,6 +196,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): record_id.log_ids[-1].write({"comment": self.comment_note_id.name, "approval_state": "3", "lase_click_date": fields.Datetime.now()}) + self.env['soong.workflow.record'].search([('code', '=', record_id.code)]).write({'state': 'end'}) if self.node_btn_name == "分发": if self.employee_ids: record_id.log_ids[-1].write({"comment": self.comment_note_id.name, diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml index 95218d3ec..afbd30083 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml +++ b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml @@ -8,7 +8,7 @@ form
- + @@ -29,6 +29,9 @@

当前流程是否结束,请确认

+
+

当前流程是否收回,请确认

+
diff --git a/yuthon_hr_attendance/models/hr_attendance_month.py b/yuthon_hr_attendance/models/hr_attendance_month.py index 518716329..4f618868a 100644 --- a/yuthon_hr_attendance/models/hr_attendance_month.py +++ b/yuthon_hr_attendance/models/hr_attendance_month.py @@ -375,7 +375,7 @@ class HrAttendanceMonthDetail(models.Model): def button_put(self): menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)]) - str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format(self.id, menu_id.id, menu_id.action.id) + str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format(self.id, menu_id.id, menu_id.action.id) we_id = self.env['hr.employee'].search([('id', '=', self.employee_id.id)]).wecom_userid self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id, title="考勤确认", description=self.employee_id.name + '请确认你的考勤:', @@ -394,7 +394,7 @@ class HrAttendanceMonthDetail(models.Model): detail_ids = self.env["hr.attendance.month.detail"].browse(self._context.get('active_ids', self._context.get('active_id'))) for detail in detail_ids: menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)]) - str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format( + str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format( self.id, menu_id.id, menu_id.action.id) we_id = self.env['hr.employee'].search([('id', '=', detail.employee_id)]).wecom_userid self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance', user_id=we_id, title="考勤确认", @@ -495,7 +495,7 @@ class HrAttendanceMonthDetail(models.Model): attendance_details = self.env['hr.attendance.month.detail'].search([]) for detail in attendance_details: menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)]) - str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format( + str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format( self.id, menu_id.id, menu_id.action.id) we_id = self.env['hr.employee'].search([('id', '=', detail.employee_id)]).wecom_userid self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance', user_id=we_id, title="考勤确认", diff --git a/yuthon_hr_attendance/views/hr_attendance_month_views.xml b/yuthon_hr_attendance/views/hr_attendance_month_views.xml index e4713f60f..a447dd792 100644 --- a/yuthon_hr_attendance/views/hr_attendance_month_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_month_views.xml @@ -5,8 +5,8 @@ hr.attendance.year - - + + @@ -21,28 +21,28 @@ hr.attendance.month - - + + - +