diff --git a/soong_workflow/__manifest__.py b/soong_workflow/__manifest__.py
index 4e5ad2cff..0f596ae00 100644
--- a/soong_workflow/__manifest__.py
+++ b/soong_workflow/__manifest__.py
@@ -19,7 +19,7 @@
"views/soong_approval_users_views.xml",
"views/soong_note_views.xml",
"views/soong_note_setting_views.xml",
- "views/soong_hr_employee_views.xml",
+ # "views/soong_hr_employee_views.xml",
"views/soong_user_role_views.xml",
"views/soong_workflow_node_views.xml",
"views/soong_workflow_link_views.xml",
diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py
index e33158862..2991dced2 100644
--- a/soong_workflow/models/soong_workflow_mixin.py
+++ b/soong_workflow/models/soong_workflow_mixin.py
@@ -842,7 +842,7 @@ class SoongWorkflowMixin(models.AbstractModel):
id_el = etree.Element("field")
id_el.set("name", "log_ids")
id_el.set("invisible", "1")
- field_inst.set("readonly", "state in %s and log_ids" % readonly_arr)
+ # field_inst.set("readonly", "state in %s and log_ids" % readonly_arr)
if required_arr:
field_inst.set("required", "state in %s" % required_arr)
if invisible_arr:
diff --git a/soong_workflow/views/soong_hr_employee_views.xml b/soong_workflow/views/soong_hr_employee_views.xml
index a8816f596..758bdadbc 100644
--- a/soong_workflow/views/soong_hr_employee_views.xml
+++ b/soong_workflow/views/soong_hr_employee_views.xml
@@ -25,4 +25,16 @@
+
+
+ inherit.view.employee.filter
+ hr.employee
+
+
+
+ parent_id
+ multi
+
+
+
\ No newline at end of file
diff --git a/yuthon_contract/models/inherit_hr_contract.py b/yuthon_contract/models/inherit_hr_contract.py
index f34f65352..94a0c7e34 100644
--- a/yuthon_contract/models/inherit_hr_contract.py
+++ b/yuthon_contract/models/inherit_hr_contract.py
@@ -54,3 +54,20 @@ class HrContract(models.Model):
company_id = contract.employee_id.company_id
contract.write({
'company_id':company_id.id})
+
+ @api.onchange('contract_type_id')
+ def onchange_contract_type_id(self):
+ if self.contract_type_id and self.employee_id:
+ contract_name_mapping = {
+ '正式合同(一签)': 'formal_one',
+ '劳务协议': 'labor',
+ '正式合同(二签)': 'formal_two',
+ '正式合同(无固定)': 'formal_none',
+ '兼职协议': 'part_time',
+ '用工协议': 'employment',
+ '实习协议': 'internship'
+ }
+ contract_name = self.contract_type_id.name
+ if contract_name in contract_name_mapping:
+ user_type = contract_name_mapping[contract_name]
+ self.employee_id.use_user_type = user_type
\ No newline at end of file
diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml
index 167049504..51978472f 100644
--- a/yuthon_contract/views/inherit_hr_contract_views.xml
+++ b/yuthon_contract/views/inherit_hr_contract_views.xml
@@ -9,7 +9,7 @@
- 1
+ 用工形式
合同名称
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 077c7f4b5..90448582a 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -19,7 +19,7 @@ class YuthonWillTask(models.Model):
task_type = fields.Many2one('task.type.setting', string='任务类型')
task_content = fields.Text(string='任务内容')
remarks = fields.Text(string='备注')
- creation_time = fields.Date(string='创建时间')
+ creation_time = fields.Date(string='创建时间', default=fields.Date.today())
employee_ids = fields.Many2many('hr.employee', 'will_task_employee_rel', 'custom_id', 'employee_id',
string='人员', default=lambda self: self.env.user.employee_id)
employee_ids2 = fields.Many2many('hr.employee', 'will_task_employee_rel2',
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 8bfb67a50..119854d55 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -50,10 +50,10 @@
-
+
-
+