Merge pull request #3884 from expsa/samir-aladawi-fix-transactions-forward-user

[FIX] exp_transaction_documents
This commit is contained in:
SamirLADOUI-sa 2025-07-13 14:40:01 +01:00 committed by GitHub
commit ae736aeca0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ class InternalTransaction(models.Model):
def _fix_forward_user(self):
# Get all records where state is send and forward user is False
records = self.search([('state', '=', 'send')])
records = self.search([('state', '=', 'send'), ('forward_user_id', '=', False)])
for record in records:
last_trace_user_id = record.trace_ids.search([('internal_transaction_id', '=', record.id)], order='date DESC', limit=1).to_id.user_id.id