!7069 添加功能

Merge pull request !7069 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-12-16 09:45:23 +00:00
committed by Gitee
+12 -12
View File
@@ -725,18 +725,18 @@ class SoongWorkflowMixin(models.AbstractModel):
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
for node in wkf_rec.node_ids:
for button in node.button_ids:
# if self.env.user.has_group("soong_workflow.group_soong_workflow_manager"):
# btn_exec_action_el = etree.SubElement(header_el, "button")
# btn_exec_action_el.set("name", "btn_exec_action")
# btn_exec_action_el.set("string", button.name)
# btn_exec_action_el.set("type", "object")
# if button.is_highlight:
# btn_exec_action_el.set("class", "oe_highlight")
# if button.has_icon:
# btn_exec_action_el.set("icon", button.icon)
# btn_exec_action_el.set("invisible", "state != '%s'" % node.node_name)
# btn_exec_action_el.set("context", "{'btn_key':'%s','active_model':'%s'}" % (button.btn_key, self._name),)
# else:
if self.env.user.has_group("soong_workflow.group_soong_workflow_manager"):
btn_exec_action_el = etree.SubElement(header_el, "button")
btn_exec_action_el.set("name", "btn_exec_action")
btn_exec_action_el.set("string", button.name)
btn_exec_action_el.set("type", "object")
if button.is_highlight:
btn_exec_action_el.set("class", "oe_highlight")
if button.has_icon:
btn_exec_action_el.set("icon", button.icon)
btn_exec_action_el.set("invisible", "state != '%s'" % node.node_name)
btn_exec_action_el.set("context", "{'btn_key':'%s','active_model':'%s'}" % (button.btn_key, self._name),)
else:
is_apostille = False
if button.btn_hide:
if button.review_type == "individual":