Merge pull request #3661 from expsa/dev_odex25_accounting

Dev odex25 accounting
This commit is contained in:
ahmed-nouri051 2025-06-26 15:45:08 +02:00 committed by GitHub
commit a50a67bf12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -52,14 +52,14 @@ class AccountPayment(models.Model):
if self.payment_type == 'outbound':
self._check_permission('odex25_account_payment_fix.group_posted')
res = super(AccountPayment, self).action_post()
self.env.invalidate_all()
for payment in self:
payment.state = 'posted'
if payment.analytic_account_id and payment.move_id:
#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:
line.analytic_account_id = payment.analytic_account_id.id