diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 4f550b458..5e970b9a6 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -906,12 +906,14 @@ class SoongWorkflowCommentWizard(models.TransientModel): if self.node_btn_name != "收回": tree_id = self.env.ref("soong_workflow.soong_workflow_record_my_tree").id + kanban_id = self.env.ref("soong_workflow.soong_workflow_record_kanban").id # self.red_reload() return { 'type': 'ir.actions.client', 'tag': 'flush_badge_wkf', 'params': { 'tree_id': tree_id, + 'kanban_id': kanban_id, 'uid': self.env.uid, } } diff --git a/sun_badge_menu/static/src/webclient/actions/client_actions.js b/sun_badge_menu/static/src/webclient/actions/client_actions.js index 2d8e46fb8..e0db08a57 100644 --- a/sun_badge_menu/static/src/webclient/actions/client_actions.js +++ b/sun_badge_menu/static/src/webclient/actions/client_actions.js @@ -27,12 +27,12 @@ async function flushBadge(env, action) { } registry.category("actions").add("flush_badge", flushBadge); -const getWkfAction = (treeId, uid) => { +const getWkfAction = (treeId, kanbanId, uid, isSmall) => { return { name: '流程待办', type: 'ir.actions.act_window', res_model: 'soong.workflow.record', - views: [[treeId, 'tree']], + views: isSmall ? [[kanbanId, 'kanban']] : [[treeId, 'tree']], domain: [ ['users_ids', 'in', uid], ['reclaim_state', '=', false], @@ -51,10 +51,10 @@ async function flushBadgeWithWorkflow(env, action) { env.services.menu.setCurrentMenu(action.params.menu_id); } - // 跳转tree - const { tree_id, uid } = action.params; - if (tree_id && uid) { - return env.services.action.doAction(getWkfAction(tree_id, uid)); + // 跳转tree or kanban + const { tree_id, kanban_id, uid } = action.params; + if (tree_id && kanban_id && uid) { + return env.services.action.doAction(getWkfAction(tree_id, kanban_id, uid, env.isSmall)); } const controller = env.services.action.currentController; diff --git a/yuthon_hr_attendance/controllers/portal.py b/yuthon_hr_attendance/controllers/portal.py index f595bfe2c..d6c1736f7 100644 --- a/yuthon_hr_attendance/controllers/portal.py +++ b/yuthon_hr_attendance/controllers/portal.py @@ -87,6 +87,7 @@ class CustomerPortal(portal.CustomerPortal): ('vacation_date', '<', f'{last_month_year}-{last_month + 1:02d}-01' if last_month < 12 else f'{last_month_year + 1}-01-01') ], limit=1) data = { + 'state': '已确认' if record.vacation_state == 'confirmed' else '待确认', '日期': record.display_date, '应到': records.should_attendance, '实到': records.actual_attendance, diff --git a/yuthon_salary/controllers/salary_phone.py b/yuthon_salary/controllers/salary_phone.py index bc0dd5211..9983f8e68 100644 --- a/yuthon_salary/controllers/salary_phone.py +++ b/yuthon_salary/controllers/salary_phone.py @@ -107,6 +107,7 @@ class YuthonWillTask(http.Controller): # 使用格式化字符串保留两位小数 field_value = f"{field_value:.2f}" data[field_string] = field_value + data['state'] = 'no' if record.confirm_status != 'confirm' else 'yes' return json.dumps({'data': data, 'code': 200, 'message': ''}) @http.route('/phone/salary/self/status', type='http', auth="none", csrf=False, cors='*')