Skip to content

Commit

Permalink
[FIX] account_payment_group_financial_surcharge: Error creating auto …
Browse files Browse the repository at this point in the history
…debit note

closes #554

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
  • Loading branch information
feg-adhoc committed Nov 4, 2024
1 parent 5ad7a76 commit 2acb863
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def post(self):
wiz.amount_total = financing_surcharge_to_invoice
wiz.confirm()

# We added this commit in case the connection is lost or there is an error before payment
# validation and prevents the debit note from being created multiple times
self.env.cr.commit()

# If we are registering a payment of a draft invoice then we need to remove the invoice from the debts of the payment group
# in order to be able to post/reconcile the payment group (this is needed because in odoo 16 we are not able to renconcile
# draft account.move. only can reconcile posted ones)
Expand Down

0 comments on commit 2acb863

Please sign in to comment.