@@ -771,14 +771,6 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
if self.node_btn_name in ['结束', '确认']:
|
||||
title = record_id._description
|
||||
current_comment = self.comment or ''
|
||||
# 自动设置审批结果为 不通过
|
||||
if any(keyword in current_comment for keyword in ['不同意', '不批准', '不通过']):
|
||||
if hasattr(record_id, 'approval_result'):
|
||||
record_id.approval_result = 'fail'
|
||||
else:
|
||||
if hasattr(record_id, 'approval_result'):
|
||||
record_id.approval_result = 'pass'
|
||||
self.node_btn_id.with_context(cx).run()
|
||||
if 'Room Booking' == record_id._description:
|
||||
title = '会议通知'
|
||||
is_work_remind = False
|
||||
@@ -842,6 +834,14 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
'soong_state': 'done',
|
||||
})
|
||||
record_id.work_end = True
|
||||
# 自动设置审批结果为 不通过
|
||||
if any(keyword in current_comment for keyword in ['不同意', '不批准', '不通过']):
|
||||
if hasattr(record_id, 'approval_result'):
|
||||
record_id.approval_result = 'fail'
|
||||
else:
|
||||
if hasattr(record_id, 'approval_result'):
|
||||
record_id.approval_result = 'pass'
|
||||
self.node_btn_id.with_context(cx).run()
|
||||
|
||||
if is_admin:
|
||||
user_log = record_id.log_ids.filtered(
|
||||
|
||||
Reference in New Issue
Block a user