From 5bd1557a68da18f938e4ecb87ac077186a61769f Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Thu, 8 Jan 2026 17:41:01 +0800 Subject: [PATCH 1/2] 1 --- yuthon_wechat/models/wecom_apps.py | 9 ++++++--- yuthon_will_task/models/yuthon_will_task.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/yuthon_wechat/models/wecom_apps.py b/yuthon_wechat/models/wecom_apps.py index 5146c2c2a..8fe91ed90 100644 --- a/yuthon_wechat/models/wecom_apps.py +++ b/yuthon_wechat/models/wecom_apps.py @@ -98,11 +98,14 @@ class WeComApps(models.Model): return False, result_data def back_message(self, msg_id='', category="default"): + token = '' if category == 'task': token = self.env['wecom.apps'].search([('name', '=', '日程消息通知')])['access_token'] - data = {'msgid': msg_id} - url = f'https://qyapi.weixin.qq.com/cgi-bin/message/recall?access_token={token}' - requests.post(url=url, data=json.dumps(data)) + if category == 'approval': + token = self.env['wecom.apps'].search([('name', '=', '审批消息通知')])['access_token'] + data = {'msgid': msg_id} + url = f'https://qyapi.weixin.qq.com/cgi-bin/message/recall?access_token={token}' + requests.post(url=url, data=json.dumps(data)) def sync_send_message_textcard(self, content_item='', touser='', category='default', user_id=None, title="", description="", url="", btntxt="详情"): """ diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index 9b6d5f3f7..9d11f068a 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -202,7 +202,7 @@ class YuthonWillTask(models.Model): url = f'https://phone.thtzjt.com/phone/Schedule/{self.id}/{employee_id.id}' self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid, title="日程事项提醒", description=data, url=url, btntxt="详细信息") - test_msg_id = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id="18562027762", + self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id="18562027762", title="日程事项提醒", description=data, url=url, btntxt="详细信息") # self.write({'msg_id': test_msg_id[-1]['msgid']}) return { From 06119d711a6b8a613e37c8368b076efcb52cb3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 8 Jan 2026 18:06:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_base/models/ir_model.py | 13 ++++++++- yuthon_base/security/ir.model.access.csv | 1 + yuthon_base/views/ir_cron_act_views.xml | 29 +++++++++++++++++++ ...roperty_lease_contract_print_templates.xml | 12 ++++---- 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/yuthon_base/models/ir_model.py b/yuthon_base/models/ir_model.py index 901d73965..e6a557ab8 100644 --- a/yuthon_base/models/ir_model.py +++ b/yuthon_base/models/ir_model.py @@ -1,5 +1,5 @@ from odoo import fields, models, api - +from odoo import api, fields, models class IrModelFields(models.Model): _inherit = 'ir.model.fields' @@ -9,3 +9,14 @@ class IrModelFields(models.Model): return name.startswith('x_') or name.endswith('_pinyin') +class UsersHomeBatchWizard(models.TransientModel): + _name = "users.home.batch.wizard" + _description = "Batch Update User Home" + + + user_ids = fields.Many2many("res.users", string="选中员工", default=lambda self: self.env.context.get("active_ids", [])) + action_id = fields.Many2one('ir.actions.actions', string="动作") + + def confirm(self): + for user in self.user_ids: + user.write({'action_id': self.action_id.id}) diff --git a/yuthon_base/security/ir.model.access.csv b/yuthon_base/security/ir.model.access.csv index abc9f248e..cc8505a56 100644 --- a/yuthon_base/security/ir.model.access.csv +++ b/yuthon_base/security/ir.model.access.csv @@ -2,3 +2,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_system_version,system_version,model_system_version,base.group_system,1,1,1,1 access_ir_cron_type,ir.cron.type,model_ir_cron_type,base.group_system,1,1,1,1 access_yuthon_timed_tasks,yuthon.timed.tasks,model_yuthon_timed_tasks,base.group_system,1,1,1,1 +access_users_home_batch_wizard,access_users_home_batch_wizard,model_users_home_batch_wizard,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_base/views/ir_cron_act_views.xml b/yuthon_base/views/ir_cron_act_views.xml index 4b0df02b2..fb301dc4d 100644 --- a/yuthon_base/views/ir_cron_act_views.xml +++ b/yuthon_base/views/ir_cron_act_views.xml @@ -42,5 +42,34 @@ tree,form [('cron_type_id.name', '=', '出勤')] + + users.home.batch.wizard.form + users.home.batch.wizard + +
+ + + + + + + +
+
+ +
+
+ + + 批量更新首页 + users.home.batch.wizard + form + + new + + list + diff --git a/yuthon_property_approval/report/property_lease_contract_print_templates.xml b/yuthon_property_approval/report/property_lease_contract_print_templates.xml index 38d8e01a3..9d924d14a 100644 --- a/yuthon_property_approval/report/property_lease_contract_print_templates.xml +++ b/yuthon_property_approval/report/property_lease_contract_print_templates.xml @@ -35,8 +35,8 @@ } /* 审批详情列宽(匹配上方表格的5列结构) */ .approval-col1 { width: 20%; } /* 匹配上方"合同编号"等标题列宽度 */ - .approval-col2 { width: 40%; } /* 匹配上方内容列宽度 */ - .approval-col3 { width: 40%; } /* 匹配上方内容列宽度 */ + .approval-col2 { width: 40%; border-right: none !important; } /* 匹配上方内容列宽度 */ + .approval-col3 { width: 40%; border-left: none !important; } /* 匹配上方内容列宽度 */
租赁合同审批单
@@ -123,7 +123,7 @@ - + 审批详情 @@ -131,8 +131,10 @@ - - + + + +