添加功能
This commit is contained in:
@@ -86,6 +86,8 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
|
||||
if record.res_model and record.res_id:
|
||||
target_model = self.env[record.res_model]
|
||||
target_record = target_model.sudo().browse(record.res_id).exists()
|
||||
if hasattr(target_record, 'work_end'):
|
||||
target_record.work_end = False
|
||||
if target_record:
|
||||
if target_model._name in ["hr.leave.batch"]:
|
||||
if target_record.leave_ids:
|
||||
|
||||
@@ -58,6 +58,8 @@ class SoongWorkflowRecordRevokeWizard(models.TransientModel):
|
||||
meal_line.unlink()
|
||||
record_to_update.write({'log_ids': [(5, 0, 0)]})
|
||||
record_to_update.state = '申请人'
|
||||
if hasattr(record_to_update, 'work_end'):
|
||||
record_to_update.work_end = False
|
||||
if hasattr(record_to_update, 'self_users_ids'):
|
||||
if hasattr(record_to_update, 'user_id') and record_to_update.user_id:
|
||||
query_user_id = record_to_update.user_id.id
|
||||
|
||||
Reference in New Issue
Block a user