Steps to reproduce the bug:
- Create a promotion program PP
- Set 50 in minimal amount
- Set promo_applicability = on_next_order
- Set reward_type = discount
- Set discount_type = discount
- Create a new sale order SO with a product with price 100€
- Cancel the SO
Bug:
A coupon C had been created
PS: When reset to draft and confirm SO, C became valid
Closes#64361
opw:2431740
closesodoo/odoo#65067
X-original-commit: c2ce00173c612d38dd8dc6b1f15edf2261f2acc6
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>