Merge pull request #3769 from expsa/modify_trans

transaction approve
This commit is contained in:
eslamtalaat744 2025-07-06 18:45:40 +03:00 committed by GitHub
commit c301aca01b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -222,9 +222,12 @@ class InternalTransaction(models.Model):
employee = self.current_employee()
to_id = self.to_ids.id
if self.to_ids.type == 'employee':
self.forward_user_id = self.to_ids.user_id.id
if self.to_ids.type != 'employee':
to_id = self.to_ids.secretary_id.id
self.forward_user_id = self.to_ids.manager_id.user_id
self.forward_user_id = self.to_ids.manager_id.user_id
self.trace_ids.create({
'action': 'sent',
'to_id': to_id,