From b59cbbccb339c18874d3dbde61ea1689f136a7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Fri, 21 Feb 2025 16:38:40 +0800 Subject: [PATCH] 1 --- .../data/notice_role_groups_data.xml | 12 ----- yuthon_notice/models/yuthon_confirm_users.py | 3 -- yuthon_notice/models/yuthon_notice.py | 2 +- .../security/yuthon_notice_group.xml | 21 +------- .../views/yuthon_confirm_users_views.xml | 5 +- .../views/yuthon_notice_type_views.xml | 10 +++- yuthon_notice/views/yuthon_notice_views.xml | 50 ++----------------- 7 files changed, 15 insertions(+), 88 deletions(-) diff --git a/yuthon_notice/data/notice_role_groups_data.xml b/yuthon_notice/data/notice_role_groups_data.xml index 697610433..71e8e8365 100644 --- a/yuthon_notice/data/notice_role_groups_data.xml +++ b/yuthon_notice/data/notice_role_groups_data.xml @@ -4,16 +4,4 @@ 信息发布管理员 departmental_role - - 天河投资信息发布员 - departmental_role - - - 天河粮储信息发布员 - departmental_role - - - 天河物管信息发布员 - departmental_role - \ No newline at end of file diff --git a/yuthon_notice/models/yuthon_confirm_users.py b/yuthon_notice/models/yuthon_confirm_users.py index 1be2b763d..e95cf4a8c 100644 --- a/yuthon_notice/models/yuthon_confirm_users.py +++ b/yuthon_notice/models/yuthon_confirm_users.py @@ -6,7 +6,6 @@ from odoo.exceptions import UserError, ValidationError class YuthonConfirmUsers(models.Model): _name = "yuthon.confirm.users" _description = "公告确认信息" - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] employee_id = fields.Many2one('hr.employee', string='员工') notice_id = fields.Many2one('yuthon.notice', string="公告名称") @@ -34,8 +33,6 @@ class YuthonConfirmUsers(models.Model): confirm_noice_ids = self.env["yuthon.confirm.users"].browse(self._context.get('active_ids', self._context.get('active_id'))) for rec in confirm_noice_ids: menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的通知公告')]) - action_id = self.env['ir.ui.menu'].search([('name', '=', '我的通知公告')]) - # action=2032&model=hr.attendance&view_type=list&cids=1&menu_id=6335 str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=yuthon.notice&view_type=form'.format( rec.notice_id.id, menu_id.id, menu_id.action.id) self.sudo().env["wecom.apps"].sync_send_message_textcard(category='notice', diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index 9d0364984..7fa4abff4 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -6,7 +6,7 @@ from odoo.exceptions import ValidationError, UserError class YuthonNotice(models.Model): _name = "yuthon.notice" _description = '通知公告' - _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin'] _rec_name = 'name' _order = "sequence desc" diff --git a/yuthon_notice/security/yuthon_notice_group.xml b/yuthon_notice/security/yuthon_notice_group.xml index 3837b8211..cda031c20 100644 --- a/yuthon_notice/security/yuthon_notice_group.xml +++ b/yuthon_notice/security/yuthon_notice_group.xml @@ -9,29 +9,10 @@ - - 天河投资通知权限 - - - - - - 天河粮储通知权限 - - - - - - 天河物管通知权限 - - - - 通知管理员 - + \ No newline at end of file diff --git a/yuthon_notice/views/yuthon_confirm_users_views.xml b/yuthon_notice/views/yuthon_confirm_users_views.xml index 5f8aa7438..1b1496468 100644 --- a/yuthon_notice/views/yuthon_confirm_users_views.xml +++ b/yuthon_notice/views/yuthon_confirm_users_views.xml @@ -6,8 +6,7 @@
-
@@ -34,6 +33,6 @@ 公告确认信息 yuthon.confirm.users tree - + {'search_group_notice':1} \ No newline at end of file diff --git a/yuthon_notice/views/yuthon_notice_type_views.xml b/yuthon_notice/views/yuthon_notice_type_views.xml index b9bd0109f..64ef5ad9d 100644 --- a/yuthon_notice/views/yuthon_notice_type_views.xml +++ b/yuthon_notice/views/yuthon_notice_type_views.xml @@ -24,11 +24,17 @@ name="配置" groups="yuthon_notice.group_notice_admin" sequence="7"/> - + + \ No newline at end of file diff --git a/yuthon_notice/views/yuthon_notice_views.xml b/yuthon_notice/views/yuthon_notice_views.xml index e6ae1dc20..ce919b1c5 100644 --- a/yuthon_notice/views/yuthon_notice_views.xml +++ b/yuthon_notice/views/yuthon_notice_views.xml @@ -4,9 +4,8 @@ yuthon.notice.tree yuthon.notice - @@ -18,8 +17,7 @@