From 199c29cafaaf13ece0cb3522941773fec4b101c6 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: Thu, 19 Mar 2026 09:59:26 +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 --- soong_workflow/models/soong_user_role.py | 1 + yuthon_catering/models/yuthon_catering.py | 19 +++++++++---------- yuthon_salary/wizard/party_meal_wizard.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/soong_workflow/models/soong_user_role.py b/soong_workflow/models/soong_user_role.py index df7e1fc1f..1b38387ac 100644 --- a/soong_workflow/models/soong_user_role.py +++ b/soong_workflow/models/soong_user_role.py @@ -109,6 +109,7 @@ class YuthonUserRole(models.Model): class YuthonUserRoleGroup(models.Model): _name = 'soong.user.role.group' _order = 'number asc' + _rec_name = 'name' name = fields.Char(string="角色名称") number = fields.Char(string="序号", store=True) diff --git a/yuthon_catering/models/yuthon_catering.py b/yuthon_catering/models/yuthon_catering.py index 0f681f66f..342b623f4 100644 --- a/yuthon_catering/models/yuthon_catering.py +++ b/yuthon_catering/models/yuthon_catering.py @@ -59,16 +59,15 @@ class YuthonCatering(models.Model): if not tomorrow_menu: return for emp in employee_ids: - if emp.name == '叶华锋': - url = f"https://phone.thtzjt.com/phone/Meal/{emp.user_id.id}" - self.sudo().env["wecom.apps"].sync_send_message_textcard( - category='can', - user_id=emp.wecom_userid, - title="餐饮通知", - description="请在 18:00 前登记下一工作日用餐,18点后未填的系统将自动视为就餐,如有疑问,联系办公室。", - url=url, - btntxt="详细信息" - ) + url = f"https://phone.thtzjt.com/phone/Restaurant/{emp.user_id.id}" + self.sudo().env["wecom.apps"].sync_send_message_textcard( + category='can', + user_id=emp.wecom_userid, + title="餐饮通知", + description="请在 18:00 前登记下一工作日用餐,18点后未填的系统将自动视为就餐,如有疑问,联系办公室。", + url=url, + btntxt="详细信息" + ) def task_conf(self): tomorrow = fields.Date.today() + timedelta(days=1) diff --git a/yuthon_salary/wizard/party_meal_wizard.py b/yuthon_salary/wizard/party_meal_wizard.py index d62efe088..35b4982f8 100644 --- a/yuthon_salary/wizard/party_meal_wizard.py +++ b/yuthon_salary/wizard/party_meal_wizard.py @@ -58,9 +58,9 @@ class PartyMealWizard(models.TransientModel): def confirm(self): description = f'您有一条缴纳餐费,请及时查看,如有异议,请联系办公室进行复核。请于{self.select_year}年{self.select_time}月{self.select_days}日前将款项汇入指定账户:44001580909059000222 广州市天河投资集团有限公司(转账时请备注“姓名+XX月餐费”),并在完成付款后在集团oa的菜单:“我的”-“餐费”点击“已缴费' - url = f'https://oa.thtzjt.com/web#action=4579&model=yuthon.meal.expenses&view_type=list&menu_id=10922' if self.employee_ids: for employee in self.employee_ids: + url = f'https://phone.thtzjt.com/phone/Meal/{employee.user_id.id}' meal = self.env['yuthon.meal.expenses'].search([('employee_id', '=', employee.id), ('select_time', '=', self.select_time), ('select_year', '=', self.select_year),