Merge pull request #2030 from expsa/transacrion_transaltion

leave
This commit is contained in:
enagahh 2025-01-01 13:07:33 +02:00 committed by GitHub
commit 2737c22233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -244,6 +244,9 @@ class Transaction(models.Model):
def action_draft(self):
for record in self:
if record.subject_type_id.transaction_need_approve or record.preparation_id.need_approve:
record.to_delegate = record.to_ids.to_delegate
if record.to_delegate:
record.to_ids = record.to_ids.delegate_employee_id.id
record.state = 'to_approve'
else:
record.action_send()