@@ -96,7 +96,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
# 判断当前节点的状态
|
||||
matched_logs = record.log_ids.filtered(lambda log: log.name == current_state)
|
||||
if matched_logs:
|
||||
if matched_logs[-1].approval_state != '0':
|
||||
if matched_logs[-1].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)
|
||||
|
||||
@@ -567,13 +567,20 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
'lase_click_date': current_datetime,
|
||||
'document_ids': [(6, 0, self.document_ids.ids)]
|
||||
})
|
||||
if record_id.log_ids2 and self.node_btn_name == '确认':
|
||||
if (record_id.log_ids2 or record_id.log_ids.filtered(lambda log: log.name == '承办')) and self.node_btn_name == '确认':
|
||||
user_log2 = record_id.log_ids2.filtered(lambda log: log.done_by == current_user)
|
||||
user_log1 = record_id.log_ids.filtered(lambda log: log.done_by == current_user)
|
||||
if user_log2:
|
||||
user_log2.write({
|
||||
'commit': self.comment,
|
||||
'approval_state': "2",
|
||||
'lase_click_date': current_datetime,
|
||||
'lase_click_date': current_datetime + timedelta(hours=8),
|
||||
})
|
||||
if user_log1:
|
||||
user_log1.write({
|
||||
'commit': self.comment,
|
||||
'approval_state': "2",
|
||||
'lase_click_date': current_datetime + timedelta(hours=8),
|
||||
})
|
||||
for employee in self.circulated_employee_ids:
|
||||
action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0]
|
||||
|
||||
Reference in New Issue
Block a user