添加功能
This commit is contained in:
@@ -610,6 +610,9 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
this = self
|
||||
model = self._name
|
||||
wkf_obj = self.env["soong.workflow"]
|
||||
wkf_record = self.env["soong.workflow.record"].search(
|
||||
[("res_model", "=", self._name), ("res_id", "=", self.id)])
|
||||
approve_state = wkf_record.approve_state if wkf_record else ""
|
||||
arch = etree.fromstring(res["arch"])
|
||||
|
||||
# Helper Functions
|
||||
@@ -746,6 +749,8 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
id_el.set("name", "log_ids")
|
||||
id_el.set("invisible", "1")
|
||||
invisible += " or not log_ids "
|
||||
if approve_state == "end" and button.name == "结束":
|
||||
invisible += " or True"
|
||||
# invisible += " or not work_end "
|
||||
btn_exec_action_el.set("invisible", invisible)
|
||||
btn_exec_action_el.set("context", "{'btn_key':'%s','active_model':'%s'}" % (button.btn_key, self._name),)
|
||||
|
||||
Reference in New Issue
Block a user