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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user