@@ -129,18 +129,14 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
record.is_confirm = True
|
||||
record.is_end = True
|
||||
domain = [('done_by', '=', self.env.user.id), ('workflow_id', '=', record.workflow_id.id),
|
||||
('res_id', '=', record.id), ('approval_state', 'in', ['0', '1']), ('name', '!=', '归档')]
|
||||
('res_id', '=', record.id), ('approval_state', 'not in', ['0', '1']), ('name', '!=', '归档')]
|
||||
lg2 = record.log_ids2.search(domain)
|
||||
lg1 = record.log_ids.search(domain)
|
||||
if lg2 or lg1:
|
||||
record.is_confirm = False
|
||||
if not lg1 and not lg2 and record.is_active == True:
|
||||
if not lg1 and not lg2:
|
||||
record.is_end = False
|
||||
|
||||
if record.log_ids:
|
||||
if record.log_ids[-1].name == '归档' and record.log_ids[-1].approval_state == '2':
|
||||
record.is_end = True
|
||||
|
||||
@api.depends("node_id", "log_ids")
|
||||
def _compute_approval_sign_ids(self):
|
||||
for record in self:
|
||||
@@ -878,7 +874,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
id_el = etree.Element("field")
|
||||
id_el.set("name", "log_ids")
|
||||
id_el.set("invisible", "1")
|
||||
invisible += "or is_end"
|
||||
invisible += "or not is_end"
|
||||
if button.name == "退回":
|
||||
id_el = etree.Element("field")
|
||||
id_el.set("name", "log_ids")
|
||||
|
||||
Reference in New Issue
Block a user