Merge pull request #3674 from expsa/fix-bug-accounting

invalide cache
This commit is contained in:
ahmed-nouri051 2025-06-26 17:16:34 +02:00 committed by GitHub
commit f187bbf1aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ class AccountPayment(models.Model):
for payment in self:
payment.refresh()
#payment.state = 'posted'
payment.invalidate_cache()
payment.state = 'posted'
if payment.analytic_account_id and payment.move_id and payment.move_id.exist():
for line in payment.move_id.line_ids:
if line.account_id.id == payment.destination_account_id.id: