Skip to content
Snippets Groups Projects
Commit 2e5c0bf6 authored by David's avatar David Committed by Victor Feyens
Browse files

[FIX] sale_loyalty: prevent sending coupon message on failed sale confirm


There can be multiple causes that could prevent a sales order gets
confirmed when we push the *Confirm* button. This can be common when
extension modules come to play.

The simplest way to reproduce it (no extra modules needed) would be to
make an automated action on sale.order with a criteria that could avoid
the confirmation throwing a UserError.

The coupon email would be sent anyway as we can't rollback a mail
sending once it's gone away but it wouldn't be valid as the process
stopped after it.

So we want to prevent sending that mail if the sale.order can't be
confirmed.

TT42124

closes odoo/odoo#116898

X-original-commit: 14103b62
Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 459d5d75
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment