From cf45d076e2240a31224736470a057a3157929e7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
Date: Mon, 10 Feb 2025 11:36:45 +0800
Subject: [PATCH] 1
---
.../views/send_notifications.xml | 8 ++++----
.../views/web_push_notification.xml | 2 +-
soong_workflow/models/soong_workflow_mixin.py | 2 +-
yuthon_hr_employee_approval/models/inherit_hr_job.py | 12 ++++++++----
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/sh_backmate_theme_adv_enterprise/views/send_notifications.xml b/sh_backmate_theme_adv_enterprise/views/send_notifications.xml
index 43124fcbf..81019bee6 100644
--- a/sh_backmate_theme_adv_enterprise/views/send_notifications.xml
+++ b/sh_backmate_theme_adv_enterprise/views/send_notifications.xml
@@ -61,9 +61,9 @@
-
+
+
+
-
+
\ No newline at end of file
diff --git a/sh_backmate_theme_adv_enterprise/views/web_push_notification.xml b/sh_backmate_theme_adv_enterprise/views/web_push_notification.xml
index 648bf8a36..cd7539b62 100644
--- a/sh_backmate_theme_adv_enterprise/views/web_push_notification.xml
+++ b/sh_backmate_theme_adv_enterprise/views/web_push_notification.xml
@@ -37,5 +37,5 @@
-
+
\ No newline at end of file
diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py
index 52a3a01b5..69018ce45 100644
--- a/soong_workflow/models/soong_workflow_mixin.py
+++ b/soong_workflow/models/soong_workflow_mixin.py
@@ -477,7 +477,7 @@ class SoongWorkflowMixin(models.AbstractModel):
self.mapped("log_ids").unlink()
record_objs = self.env["soong.workflow.record"].search([("res_model", "=", self._name), ("res_id", "in", self.ids)])
record_objs.unlink()
- return super().unlink()
+ return super(SoongWorkflowMixin, self).unlink()
def action_open_diagram(self):
self.ensure_one()
diff --git a/yuthon_hr_employee_approval/models/inherit_hr_job.py b/yuthon_hr_employee_approval/models/inherit_hr_job.py
index d639d2cac..5243cb437 100644
--- a/yuthon_hr_employee_approval/models/inherit_hr_job.py
+++ b/yuthon_hr_employee_approval/models/inherit_hr_job.py
@@ -12,10 +12,15 @@ class HrJob(models.Model):
def pub_applicant_approval_button(self):
for pub in self:
- if pub.is_pub == True:
- raise UserError('该岗位已经提交发布申请,请勿重复提交')
+ if pub.compiling_status != '1':
+ raise UserError('只有缺编的岗位才可以发布申请')
+ for rec in self.env['yuthon.recruitment.approval'].search([]):
+ for i in rec.recruitment_ids:
+ if pub.id == i.id:
+ rec.is_pub = True
+ raise UserError('该岗位已经发布申请,请勿重复提交,到对应流程中查看,流程的流水号为 %s' % rec.code)
hr_job_ids = self.env["hr.job"].browse(self._context.get('active_ids', self._context.get('active_id')))
- first_department_id=hr_job_ids[0].department_id
+ first_department_id = hr_job_ids[0].department_id
for hr_job in hr_job_ids:
if hr_job.department_id != first_department_id:
raise UserError("招聘需部门相同,请重新选择")
@@ -24,7 +29,6 @@ class HrJob(models.Model):
raise UserError('岗位失效,请勿提交')
hr_job_data = [(6, 0, hr_job_ids.ids)]
form_id = self.env.ref("yuthon_hr_employee_approval.view_yuthon_recruitment_approval_form").id
- self.is_pub = True
return {
'type': 'ir.actions.act_window',
'name': '提交招聘需求申请',