From 1cc4fbfcbee520205cfc80c540b0d892dc0dc1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 22 Apr 2026 14:51:46 +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/models/message_reminder_tasks.py | 2 -- yuthon_will_task/models/yuthon_will_task.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/yuthon_hr_attendance/models/message_reminder_tasks.py b/yuthon_hr_attendance/models/message_reminder_tasks.py index bc2b14d31..4da0b447c 100644 --- a/yuthon_hr_attendance/models/message_reminder_tasks.py +++ b/yuthon_hr_attendance/models/message_reminder_tasks.py @@ -183,7 +183,6 @@ class MessageReminderTasks(models.Model): for rt, rtype in zip(r_times, r_types): current_data_val = (rt + timedelta(hours=8)).date() - # ================== 加了这里:判断是否已存在 ================== exists = self.env['message.reminder.tasks'].search([ ('name', '=', employee.name), ('current_data', '=', current_data_val), @@ -191,7 +190,6 @@ class MessageReminderTasks(models.Model): ], limit=1) if exists: continue # 已存在,跳过不创建 - # ============================================================== task_plan_vals = { 'name': employee.name, diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index d3a2c49d6..a38152fbb 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -54,7 +54,7 @@ class YuthonWillTask(models.Model): priority = fields.Selection([('important', '重要不紧急'), ('urgent', '紧急不重要'), ('very_urgent', '重要且紧急')], string='优先级') code = fields.Char(string="任务编号", default=lambda self: self.env['ir.sequence'].next_by_code('task_code')) user_id = fields.Many2one('res.users', string="创建人", default=lambda self: self.env.user) - company_id = fields.Many2one(related="user_id.employee_id.company_id", string="公司", store=True) + company_id = fields.Many2one(related="employee_id.company_id", string="公司", store=True) name = fields.Text(string='任务内容') remarks = fields.Text(string='备注') employee_ids_short = fields.Char(string='参与人简略', compute='_compute_employee_ids_short')