diff --git a/attendance_iot/controllers/kaoqin_test.py b/attendance_iot/controllers/kaoqin_test.py index d4009ad9d..d50482966 100644 --- a/attendance_iot/controllers/kaoqin_test.py +++ b/attendance_iot/controllers/kaoqin_test.py @@ -53,17 +53,20 @@ class BusController(Controller): _logger.info("----------------/api/v1/record/face---------接口收到响应-------------------------------") data = request.httprequest.json user_id = data.get('logs')[0].get('user_id') + recog_time = data.get('logs')[0].get('recog_time') + _logger.info(f"打卡时间{recog_time}-----当前时间{fields.Datetime.now()}打卡时间") employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('mobile_phone', '=', user_id)]) attendance_iot_id = request.env(user=SUPERUSER_ID)["attendance.iot"].search([('name', '=', data.get('sn'))]) - if employee_id: - request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({ - 'employee_id': employee_id.id, # 员工 - 'checkin_time': fields.Datetime.now(), # 打卡时间 - 'source': 'iot', # 打卡来源 - 'attendance_iot_id': attendance_iot_id.id, # 打卡设备 - }) + # if employee_id: + # request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({ + # 'employee_id': employee_id.id, # 员工 + # 'checkin_time': fields.Datetime.now(), # 打卡时间 + # 'checkin_time': recog_time, # 打卡时间 + # 'source': 'iot', # 打卡来源 + # 'attendance_iot_id': attendance_iot_id.id, # 打卡设备 + # }) - _logger.info(f"考勤机自定义编码{user_id}: {employee_id.name}打卡--{fields.Datetime.now()}") + # _logger.info(f"考勤机自定义编码{user_id}: {employee_id.name}打卡--{fields.Datetime.now()}") return {"Result": 0, "Msg": "添加成功"} @route('/api/v1/user/inf_photo', methods=['POST'], type='json', auth='none', csrf=False) diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index b4e7e98de..f961724e2 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -768,7 +768,6 @@ class SoongWorkflowCommentWizard(models.TransientModel): return { 'name': '流程待办', 'view_mode': 'tree', - # "tag": "flush_badge", 'res_model': 'soong.workflow.record', 'type': 'ir.actions.act_window', 'views': [[tree_id, 'tree']], @@ -779,12 +778,6 @@ class SoongWorkflowCommentWizard(models.TransientModel): 'check_employee': 1 } } - # return { - # "type": "ir.actions.client", - # # "tag": "flush_badge", - # "tag": "reload", - # "params": {"menu_id": menu_id} - # } def update_self_users_ids(self): diff --git a/sun_badge_menu/__manifest__.py b/sun_badge_menu/__manifest__.py index 2dea42907..81ad773c6 100644 --- a/sun_badge_menu/__manifest__.py +++ b/sun_badge_menu/__manifest__.py @@ -15,7 +15,7 @@ ], "assets": { "web.assets_backend": [ - # "sun_badge_menu/static/src/webclient/actions/client_actions.js", + "sun_badge_menu/static/src/webclient/actions/client_actions.js", "sun_badge_menu/static/src/webclient/navbar/navbar.js", "sun_badge_menu/static/src/webclient/navbar/navbar.xml" ],