diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index de0aee4f6..5f319b1ae 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -97,6 +97,8 @@ class SoongWorkflowCommentWizard(models.TransientModel): self.employee_ids = False if not self.employee_ids1: return + if not self.is_selection: + return filtered_employees = self.employee_ids1 # 范围过滤 if self.scope_type == 'company': @@ -306,7 +308,9 @@ class SoongWorkflowCommentWizard(models.TransientModel): if button: if button.is_node_automatic: record.is_selection = True - record._onchange_is_selection() + else: + record.is_selection = False + record._onchange_is_selection() def _send_workflow_notifications(self, partners=None): """ 通知前端刷新红点、播放音频 diff --git a/yuthon_wechat/models/hr_employee.py b/yuthon_wechat/models/hr_employee.py index f722a3f65..a1e8080ad 100644 --- a/yuthon_wechat/models/hr_employee.py +++ b/yuthon_wechat/models/hr_employee.py @@ -114,6 +114,7 @@ class HrEmployee(models.Model): "mobile": record.mobile_phone if record.mobile_phone else None, "phone": record.work_phone if record.work_phone else None, "create_employee_id": record.id, + "state": "active", "notification_type": 'inbox', }) record.user_id = user_obj.id