diff --git a/yuthon_official/models/yuthon_sub_enterprises.py b/yuthon_official/models/yuthon_sub_enterprises.py
index 7aa8c3f45..9fa4dc188 100644
--- a/yuthon_official/models/yuthon_sub_enterprises.py
+++ b/yuthon_official/models/yuthon_sub_enterprises.py
@@ -28,6 +28,8 @@ class YuthonSubEnterprises(models.Model):
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
default='normal')
work_end = fields.Boolean(string="结束")
+ employee_ids = fields.Many2many('hr.employee', string="经办人")
+
def _get_default_name_title(self):
return self._description if self._description else self._name
@@ -41,7 +43,7 @@ class YuthonSubEnterprises(models.Model):
default=lambda self: [(6, 0, [self.env.user.id])]
)
users_ids = fields.Many2many('res.users',
- string="当前经办人",
+ string="用户",
relation='yuthon_sub_enterprises_users_rel',
column1='enterprise_id',
column2='compute_user_id',
@@ -90,12 +92,14 @@ class YuthonSubEnterprises(models.Model):
record.users_ids = False
record.approve_state = False
record.soong_state = False
+ record.employee_ids = False
workflow = self.env['soong.workflow.record'].sudo().search(
[('code', '=', record.code)],
limit=1
)
if workflow:
- record.users_ids = workflow.employee_ids.mapped('user_id')
+ record.employee_ids = workflow.employee_ids.ids
+ record.users_ids = workflow.users_ids.ids
record.approve_state = workflow.approve_state
record.soong_state = workflow.soong_state
diff --git a/yuthon_official/views/yuthon_sub_enterprises_view.xml b/yuthon_official/views/yuthon_sub_enterprises_view.xml
index 78b368e54..0ba13b63e 100644
--- a/yuthon_official/views/yuthon_sub_enterprises_view.xml
+++ b/yuthon_official/views/yuthon_sub_enterprises_view.xml
@@ -8,7 +8,8 @@
-
+
+
diff --git a/yuthon_salary/views/yuthon_salary_active_views.xml b/yuthon_salary/views/yuthon_salary_active_views.xml
index 6936b6e47..eba587afe 100644
--- a/yuthon_salary/views/yuthon_salary_active_views.xml
+++ b/yuthon_salary/views/yuthon_salary_active_views.xml
@@ -4,7 +4,7 @@
yuthon.salary.active.tree
yuthon.salary.active
-
+