添加功能
This commit is contained in:
@@ -17,11 +17,25 @@ 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", "")
|
||||
if "political" in values and values.get("political", ""):
|
||||
record.political = values.get("political", "")
|
||||
record.political = values.get("political") if values.get("political") != "" else False
|
||||
if "phone" in values and values.get("phone", ""):
|
||||
record.phone = values.get("phone", "")
|
||||
if "email" in values and values.get("email", ""):
|
||||
@@ -37,7 +51,7 @@ class EmployeeLogin(Controller):
|
||||
party_time = values.get("party_time", "")
|
||||
record.party_time = datetime.strptime(party_time, '%Y-%m-%d').date()
|
||||
if "marital_status" in values and values.get("marital_status", ""):
|
||||
record.marital_status = values.get("marital_status", "")
|
||||
record.marital_status = values.get("marital_status") if values.get("marital_status") != "" else False
|
||||
if "working_time" in values and values.get("working_time", ""):
|
||||
working_time = values.get("working_time", "")
|
||||
record.working_time = datetime.strptime(working_time, '%Y-%m-%d').date()
|
||||
@@ -48,7 +62,7 @@ class EmployeeLogin(Controller):
|
||||
if "nation" in values and values.get("nation", ""):
|
||||
record.nation = values.get("nation", "")
|
||||
if "house_type" in values and values.get("house_type", ""):
|
||||
record.house_type = values.get("house_type", "")
|
||||
record.house_type = values.get("house_type") if values.get("house_type") != "" else False
|
||||
if "current_address" in values and values.get("current_address", ""):
|
||||
record.current_address = values.get("current_address", "")
|
||||
if "house_hold" in values and values.get("house_hold", ""):
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
<div class="mb-3 field-room_id">
|
||||
<label for="nation" class="form-label">民族</label>
|
||||
<input type="text" name="nation" id="nation"
|
||||
<input type="text" name="nation" id="nation" t-att-value="nation"
|
||||
t-attf-class="form-control" style="background-color:#eee;"/>
|
||||
</div>
|
||||
<div class="mb-3 field-room_id">
|
||||
|
||||
Reference in New Issue
Block a user