- Create a SO, link it to a Quotation Template (e.g. "Odoo Monthly" from
the demo data). Note that the Quotation Template must require a
payment.
- Click on "Preview", then "Accept & Pay" in the website quote
- Pay with Authorize.net
- In the Subscription linked to the SO, change the invoice date to a
date in the past (so it will generate an invoice)
- Execute manually the Scheduled Action "Generate Recurring Invoices and
Payments for Subscription Contracts"
The payment is correctly registered on Authorize (you should receive a
confirmation email), but:
- No invoice is generated
- The next invoice date has not been changed
The issue comes from the fact that:
- `payment_authorize` executes the callback method
`reconcile_pending_transaction` before changing the status of the
transaction.
- The method `reconcile_pending_transaction` cancels and unlinks the
invoice if the transaction is not 'done' or 'authorized'.
In order to solve the issue, two fixes are necessary:
- Switch the status update with the callback (this commit), as it is
already the case for Ogone and Stripe.
- Do not manually call `reconcile_pending_transaction`, since it is
already executed as callback. This avoids two increments of the period
(commit in Enterprise).
opw-694730