添加功能
This commit is contained in:
@@ -773,21 +773,21 @@ 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)
|
||||
# invisible_condition = "state != '%s'" % node.node_name
|
||||
# if model == 'purchase.order':
|
||||
# invisible_condition = invisible_condition.replace("询价", "draft")
|
||||
# btn_exec_action_el.set("invisible", invisible_condition)
|
||||
# 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)
|
||||
invisible_condition = "state != '%s'" % node.node_name
|
||||
if model == 'purchase.order':
|
||||
invisible_condition = invisible_condition.replace("询价", "draft")
|
||||
btn_exec_action_el.set("invisible", invisible_condition)
|
||||
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":
|
||||
|
||||
Reference in New Issue
Block a user