Merge pull request #3884 from expsa/samir-aladawi-fix-transactions-forward-user
[FIX] exp_transaction_documents
This commit is contained in:
commit
ae736aeca0
|
|
@ -310,7 +310,7 @@ class InternalTransaction(models.Model):
|
||||||
|
|
||||||
def _fix_forward_user(self):
|
def _fix_forward_user(self):
|
||||||
# Get all records where state is send and forward user is False
|
# 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:
|
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
|
last_trace_user_id = record.trace_ids.search([('internal_transaction_id', '=', record.id)], order='date DESC', limit=1).to_id.user_id.id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue