@@ -225,20 +225,19 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
if node.button_ids:
|
||||
for btn_name in button_priority_list:
|
||||
for btn in node.button_ids:
|
||||
if btn.name == btn_name:
|
||||
if btn.name == btn_name: # 匹配优先级按钮名称
|
||||
is_in_scope = True
|
||||
if btn.is_review_invisible:
|
||||
domain = eval(btn.invisible_expression)
|
||||
expression_result = record_id.search(domain + [('id', '=', record_id.id)])
|
||||
else:
|
||||
expression_result = True
|
||||
if expression_result:
|
||||
model = record_id.env[record_id._name]
|
||||
matched = model.search(domain + [('id', '=', record_id.id)])
|
||||
is_in_scope = bool(matched)
|
||||
if is_in_scope:
|
||||
target_btn = btn
|
||||
button = target_btn
|
||||
break
|
||||
|
||||
if not button:
|
||||
return self.env['hr.employee']
|
||||
|
||||
if button:
|
||||
break
|
||||
link_users_id = button.users_role_id
|
||||
link_users_group_ids = button.users_role_group_ids
|
||||
is_automatic = button.is_automatic
|
||||
|
||||
Reference in New Issue
Block a user