@@ -110,15 +110,15 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
next_log = all_sorted_logs[current_log_index + 1]
|
||||
if next_log.approval_state == "0":
|
||||
record.is_back = True
|
||||
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 == '承办'))
|
||||
all_logs2_approval_0 = all(log.approval_state == '0' for log in record.log_ids2)
|
||||
if all_logs2_approval_0 and all_handling_logs_approval_0 and not current_user_in_logs2 and not organizer_user_in_logs:
|
||||
record.is_back = True
|
||||
else:
|
||||
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 == '承办'))
|
||||
all_handling_logs_approval_0 = all(log.approval_state == '0' for log in record.log_ids.filtered(lambda l: l.name == '承办'))
|
||||
all_logs2_approval_0 = all(log.approval_state == '0' for log in record.log_ids2)
|
||||
if all_logs2_approval_0 and all_handling_logs_approval_0 and not current_user_in_logs2 and not organizer_user_in_logs:
|
||||
record.is_back = True
|
||||
else:
|
||||
record.is_back = False
|
||||
|
||||
def _compute_is_active(self):
|
||||
current_user_id = self.env.user.id
|
||||
|
||||
Reference in New Issue
Block a user