From 6ccda0f18507f863e85e18ef28bfd142b7fd82f5 Mon Sep 17 00:00:00 2001 From: ljmwkx <1340053001@qq.com> Date: Mon, 17 Feb 2025 11:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=88=E6=9D=83=20=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_employee/models/inherit_hr_job.py | 16 ++++++++++++++++ .../views/inherit_hr_job_views.xml | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py index afdefe70f..d96e88285 100644 --- a/yuthon_hr_employee/models/inherit_hr_job.py +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -54,6 +54,22 @@ class HrJob(models.Model): {'default_job_id': self.id} } + def action_create_new_job(self): + action = self.env.ref("hr_recruitment.hr_applicant_view_form") + return { + "type": "ir.actions.act_window", + "name": "新建", + "res_model": "hr.applicant", + "view_mode": "form", + "views": [(action.id, "form")], + "view_id": action.id, + "target": "main", + "context": + { + 'default_job_id': self.id, + } + } + @api.depends('no_of_employee') def _compute_job_personnel_ids(self): for rec in self: diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 32f9c1e45..facb48163 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -137,5 +137,17 @@ + + + hr.job.inherit.kanban + hr.job + + + + action_create_new_job + object + + +