summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-05-18 12:59:26 +0000
committerNicolas Martinelli <nim@odoo.com>2020-05-26 08:33:25 +0000
commit66240a85363ff19f6ee2d40356f19754471a6133 (patch)
treebf1dd02eed7fb47bf68d380efd5c4a239e4c98be /addons/web/static/src/js/views/basic/basic_controller.js
parentc50210f7c7e77076b7d3666f03d309bd9a00b328 (diff)
[FIX] website_sale_delivery: disable 'Pay Now' button
- Activate a single shipping provider, e.g. UPS - Go to the eCommerce, purchase an item - Enter an incorrect address (e.g. street contains more than 35 characters, or phone number without anough digits). - Go to the '/shop/payment' page Nothing prevents from clicking on the 'Pay Now' button although UPS returns an error. The fix 0b412c250afc60131188 doesn't apply after 5836f1611a715942682301 since the event requires the `o_delivery_carrier_select` class. There are several possible solutions for this issue. The one proposed has the following advantages: - no upgrade of the view is required - no additional RPC is performed It should be fine since if the default carrier selection is ok, the delivery method will be checked thanks to: https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/website_sale_delivery/views/website_sale_delivery_templates.xml#L32 If the default carrier selection is not ok, the delivery method won't be checked thanks to: https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/website_sale_delivery/controllers/main.py#L77 https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/delivery/models/sale_order.py#L152 opw-2247557 closes odoo/odoo#51852 X-original-commit: 793fa68b2f79fc7da0b92bde4d74dd03ccd9fe44 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions