Skip to content

Commit 9b3157b

Browse files
committed
[FIX] sale: don't skip super on validation post-process
Versions -------- - 18.0+ Issue ----- `super` isn't called on `_post_process` for confirmed validation transactions. Cause ----- A fix that prevented the sending of mail for validation transactions added a `continue` in a loop, which skips over the `super` call in the loop. Solution -------- Instead of `continue`, add an `if` check to see if we want to send mail. closes odoo#232232 X-original-commit: 6575954 Signed-off-by: Victor Feyens (vfe) <[email protected]> Signed-off-by: Levi Siuzdak <[email protected]>
1 parent aa8a804 commit 9b3157b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

addons/sale/models/payment_transaction.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ def _post_process(self):
8383
)._post_process()
8484

8585
for done_tx in self.filtered(lambda tx: tx.state == 'done'):
86-
confirmed_orders = done_tx._check_amount_and_confirm_order()
87-
if done_tx.operation == 'validation':
88-
continue
89-
(done_tx.sale_order_ids - confirmed_orders)._send_payment_succeeded_for_order_mail()
86+
if done_tx.operation != 'validation':
87+
confirmed_orders = done_tx._check_amount_and_confirm_order()
88+
(done_tx.sale_order_ids - confirmed_orders)._send_payment_succeeded_for_order_mail()
9089

9190
auto_invoice = self.env['ir.config_parameter'].sudo().get_bool('sale.automatic_invoice')
9291
if auto_invoice:

0 commit comments

Comments
 (0)