-
- Downloads
[FIX] sale_coupon: check coupon's date with present time
Before this commit: a coupon's start and end dates were compared with
the order date. When a customer adds a product to the cart, it creates
an order on the website. If the customer makes an order, it will remain
active until he completes it, even when the coupon is expired.
To reproduce the problem, add a product to the cart, create a coupon,
and set its end date to present time. Now you can use the coupon after
the end date has passed. So it's better to check the date with the
current time.
opw-2711987
closes odoo/odoo#82399
Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
Showing
- addons/sale_coupon/models/sale_coupon.py 1 addition, 1 deletionaddons/sale_coupon/models/sale_coupon.py
- addons/sale_coupon/models/sale_coupon_program.py 3 additions, 3 deletionsaddons/sale_coupon/models/sale_coupon_program.py
- addons/sale_coupon/models/sale_order.py 4 additions, 4 deletionsaddons/sale_coupon/models/sale_order.py
- addons/sale_coupon/tests/test_program_rules.py 48 additions, 0 deletionsaddons/sale_coupon/tests/test_program_rules.py
Loading
Please register or sign in to comment