Bug: Users are able to modify their eCommerce cart after it has been paid when they fail to return to Odoo through the payment provider's return route. This prevents the cart from being confirmed. Steps to reproduce: 1. Install the payment provider Mollie and set it to test mode. 2. Go to the /shop page, add a product to the cart, and select Mollie for the payment. 3. On Mollie's hosted payment page, use the card number 4111111111111111 with the expiry date 03/30 and the secret code 123. Select 'paid' as the payment outcome. 4. Confirm the payment but take care not to be redirected to the /payment/status route. For examples, close the tab before or comment out https://github.com/odoo/odoo/blob/15.0/addons/payment_mollie/controllers/main.py#L38. 5. Go back to /shop/cart and modify the cart. 6. Wait up to 20 minutes for the "payment: post-process transactions" cron to try to confirm the cart. 7. Check the cart's chatter: the confirmation failed because the cart's and transaction's amounts mismatch. Explanation: The post-processing of the transaction is responsible for confirming the cart, but it failed to be triggered because the user did not visit the /payment/status page. The post-processing cron takes care of pending post-processings after 10 to 20 minutes, which is long enough for the user to modify their cart. Fix: Force creating a new cart as soon as the current one is paid and is being requested by the website. task-2995504 closes odoo/odoo#102060 X-original-commit: 5f8674621cbf5919e10e32f29b66ae171fe05993 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_customize
|
|
from . import test_express_checkout_flows
|
|
from . import test_sale_process
|
|
from . import test_sitemap
|
|
from . import test_website_sale_add_to_cart_snippet
|
|
from . import test_website_sale_cart_abandoned
|
|
from . import test_website_sale_cart_payment
|
|
from . import test_website_sale_cart_popover
|
|
from . import test_website_sale_cart_recovery
|
|
from . import test_website_sale_cart
|
|
from . import test_website_sale_mail
|
|
from . import test_website_sale_pricelist
|
|
from . import test_website_sale_product_attribute_value_config
|
|
from . import test_website_sale_image
|
|
from . import test_website_sequence
|
|
from . import test_website_sale_show_compare_list_price
|
|
from . import test_website_sale_visitor
|
|
from . import test_website_sale_product
|
|
from . import test_website_sale_shop_variant_exclusion
|
|
from . import test_website_editor
|
|
from . import test_website_sale_reorder_from_portal
|
|
from . import test_website_sale_snippets
|