Skip to content
Snippets Groups Projects
Commit 04e589e8 authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[FIX] payment: User can pay without selecting a delivery method


Issue

	- Install "eCommerce" and "Inventoy"
	- Activate "Fedex" delivery connector in settings
	- Publish "Free Delivery" and "Fedex US" delivery method
	- Put the "FedEx" one above the "Free Delivery"
	- Go to shop and add an item to cart
	- Set an adress with no ZIP code and checkout
	- Select a payment methode and pay

	Order is generated without selecting a delivery method
	Same behavior happend when using only "Fedex" as delivery
	method.

Cause

	The flow make the `payment.payment_form` trigger start after
	`website_sale_delivery.checkout` JS module.
	In 'start' function of `payment.payment_form`, the `disabled`
	attribut is removed from button if no checkbox_cgv is present
	and therefore break the `disabling` managemet since
	`disabledReasons` payButton data are not sync anymore.

Solution

	Remove 'disabled' attribut only if has `disabledReasons` data on
	payButton (checkbox_cgv feature alter `disabledReasons`).

opw-2355407
opw-2357605

closes odoo/odoo#60177

Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
parent af21dba5
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