添加功能
This commit is contained in:
@@ -98,7 +98,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
if matched_logs:
|
||||
if matched_logs[-1].approval_state != '0':
|
||||
record.is_back = True
|
||||
if record._name == 'yuthon.official.incoming.normal':
|
||||
if record._name in ['yuthon.official.incoming.normal', 'yuthon.sub.enterprises']:
|
||||
current_user_in_logs2 = any(log.done_by.id == self.env.uid for log in record.log_ids2)
|
||||
organizer_user_in_logs = any(log.done_by.id == self.env.user.id for log in record.log_ids.filtered(lambda l: l.name == '承办'))
|
||||
all_handling_logs_approval_0 = all(log.approval_state == '0' for log in record.log_ids.filtered(lambda l: l.name == '承办'))
|
||||
@@ -134,7 +134,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
lg1 = record.log_ids.search(domain)
|
||||
if lg2 or lg1:
|
||||
record.is_confirm = False
|
||||
if not lg1 and not lg2:
|
||||
if (not lg1 and not lg2) or record.is_confirm:
|
||||
record.is_end = False
|
||||
|
||||
@api.depends("node_id", "log_ids")
|
||||
@@ -869,7 +869,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
id_el = etree.Element("field")
|
||||
id_el.set("name", "log_ids")
|
||||
id_el.set("invisible", "1")
|
||||
invisible += " or not log_ids or is_confirm"
|
||||
invisible += "or not is_confirm"
|
||||
if button.name == '结束':
|
||||
id_el = etree.Element("field")
|
||||
id_el.set("name", "log_ids")
|
||||
|
||||
Reference in New Issue
Block a user