@@ -295,6 +295,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
node_list = list(btn_rec.workflow_id.node_ids.sorted('sequence'))
|
||||
node_name_list = [node_name.name for node_name in node_list]
|
||||
index = self_state
|
||||
# 部门转入范围和条件判断才会创建
|
||||
for node in node_name_list[index + 1:]:
|
||||
self.env['trans.link'].create({
|
||||
'node_button_id': btn_rec.id,
|
||||
|
||||
@@ -121,6 +121,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
|
||||
@api.onchange('trans_link_id')
|
||||
def onchange_trans_employee_ids(self):
|
||||
self.employee_ids1 = False
|
||||
record_id = self.env[self.res_model].search([('id', '=', self.res_id)])
|
||||
for ret in self.trans_link_id:
|
||||
workflow_id = self.trans_link_id.node_button_id.workflow_id
|
||||
@@ -142,7 +143,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
department_domain = []
|
||||
# 按当前申请人自动匹配
|
||||
if is_automatic: # 申请人-本部门
|
||||
department_domain = [('department_id', '=', record_id.department_id.id)]
|
||||
department_domain = ['|', ('department_id', '=', record_id.department_id.id), ('department_ids', 'in', record_id.department_id.id)]
|
||||
elif is_automatic_company or is_automatic_group: # 申请人-本公司/本集团
|
||||
# 查找user_id或users_id字段
|
||||
applicant_field = None
|
||||
|
||||
Reference in New Issue
Block a user