@@ -110,6 +110,11 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
next_log = all_sorted_logs[current_log_index + 1]
|
||||
if next_log.approval_state == "0":
|
||||
record.is_back = True
|
||||
|
||||
same_node_logs = record.log_ids.filtered(lambda log: log.name == next_log.name)
|
||||
if same_node_logs and any(log.approval_state in ['1', '2'] for log in same_node_logs):
|
||||
record.is_back = False
|
||||
|
||||
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 == '承办'))
|
||||
|
||||
Reference in New Issue
Block a user