From 14da90effefbc46c8859e1cc4a68a9684f7827e1 Mon Sep 17 00:00:00 2001 From: zhouzhou <123@qq.com> Date: Thu, 7 Nov 2024 20:39:00 +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 --- .../controllers/employee_login.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/yuthon_hr_employee_approval/controllers/employee_login.py b/yuthon_hr_employee_approval/controllers/employee_login.py index 7eaa8fbba..41a11331e 100644 --- a/yuthon_hr_employee_approval/controllers/employee_login.py +++ b/yuthon_hr_employee_approval/controllers/employee_login.py @@ -16,21 +16,6 @@ class EmployeeLogin(Controller): values['employee_id'] = int(employee_id) record = request.env['yuthon.message.login'].sudo().browse(values['employee_id']) - values['staff_name'] = record.staff_name - values['political'] = record.political - values['email'] = record.email - values['home_address'] = record.home_address - # values['sex'] = record.sex - # values['date_birth'] = record.date_birth.strftime('%Y/%m/%d') - # values['party_time'] = record.party_time.strftime('%Y/%m/%d') - # values['marital_status'] = record.marital_status - # values['working_time'] = record.working_time.strftime('%Y/%m/%d') - values['home_phone'] = record.home_phone - values['origin'] = record.origin - values['nation'] = record.nation - # values['house_type'] = 'city' - values['current_address'] = record.current_address - values['house_hold'] = record.house_hold if request.httprequest.method == 'POST': if "staff_name" in values and values.get("staff_name", ""): record.staff_name = values.get("staff_name", "") @@ -68,6 +53,21 @@ class EmployeeLogin(Controller): if "house_hold" in values and values.get("house_hold", ""): record.house_hold = values.get("house_hold", "") values["message"] = "员工信息创建成功" + values['staff_name'] = record.staff_name + values['political'] = record.political + values['email'] = record.email + values['home_address'] = record.home_address + # values['sex'] = record.sex + # values['date_birth'] = record.date_birth.strftime('%Y/%m/%d') + # values['party_time'] = record.party_time.strftime('%Y/%m/%d') + # values['marital_status'] = record.marital_status + # values['working_time'] = record.working_time.strftime('%Y/%m/%d') + values['home_phone'] = record.home_phone + values['origin'] = record.origin + values['nation'] = record.nation + # values['house_type'] = 'city' + values['current_address'] = record.current_address + values['house_hold'] = record.house_hold response = request.render('yuthon_hr_employee_approval.website_form_employee', values) response.headers['X-Frame-Options'] = 'SAMEORIGIN' response.headers['Content-Security-Policy'] = "frame-ancestors 'self'"