FIX] website_sale: autoconfirm free SO

For now the SO made with an amount of 0, are not automatically velidated
as there are no transactions. To avoid this problem, we are calling
actionn_confirm on the order with amount 0.

closes odoo/odoo#33176

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Pierre Masereel
2019-05-06 08:59:52 +00:00
parent 2420492c26
commit 6caca7bb5b
+1
View File
@@ -970,6 +970,7 @@ class WebsiteSale(ProductConfiguratorController):
return request.redirect('/shop')
if order and not order.amount_total and not tx:
order.with_context(send_email=True).action_confirm()
return request.redirect(order.get_portal_url())
# clean context and session, then redirect to the confirmation page