diff --git a/yuthon_notice/models/yuthon_confirm_users.py b/yuthon_notice/models/yuthon_confirm_users.py
index 3c96c8335..9171c7cc4 100644
--- a/yuthon_notice/models/yuthon_confirm_users.py
+++ b/yuthon_notice/models/yuthon_confirm_users.py
@@ -8,7 +8,7 @@ class YuthonConfirmUsers(models.Model):
# todo 定时任务给未确认的用户发送通知公告
# todo 打印
- user_id = fields.Many2one('res.users', string='用户')
+ employee_id = fields.Many2one('hr.employee', string='员工')
notice_id = fields.Many2one('yuthon.notice', string="公告名称")
notice_code = fields.Char(string="公告编号")
notice_name = fields.Char(string="公告名称")
diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py
index 5bb2b7ff8..f890a7050 100644
--- a/yuthon_notice/models/yuthon_notice.py
+++ b/yuthon_notice/models/yuthon_notice.py
@@ -31,7 +31,7 @@ class YuthonNotice(models.Model):
@api.onchange('is_notice_roger')
def onchange_is_notice_roger(self):
- roger_id = self.env['yuthon.confirm.users'].search([('notice_id', '=', self.id), ('user_id', '=', self.env.user.id)])
+ roger_id = self.env['yuthon.confirm.users'].search([('notice_id', '=', self.id), ('employee_id', '=', self.env.user.employee_id.id)])
if not roger_id:
self.is_notice_roger = 'yes'
@@ -60,7 +60,7 @@ class YuthonNotice(models.Model):
# 已读
self.env['yuthon.confirm.users'].create({
'notice_id': self.id,
- 'user_id': user,
+ 'employee_id': user,
'notice_code': self.code,
'notice_name': self.name,
'state': 'no',
@@ -77,7 +77,6 @@ class YuthonNotice(models.Model):
'name': '新的通知公告' + self.name + "请及时确认",
'user_ids': [(4, user)],
'notice_origin_id': self.id,
- 'description': self.sudo().env["wecom.apps"].sync_send_message(we_id, data),
})
diff --git a/yuthon_notice/views/yuthon_confirm_users_views.xml b/yuthon_notice/views/yuthon_confirm_users_views.xml
index 841b4917e..e9690ca97 100644
--- a/yuthon_notice/views/yuthon_confirm_users_views.xml
+++ b/yuthon_notice/views/yuthon_confirm_users_views.xml
@@ -5,7 +5,7 @@
yuthon.confirm.users
-
+