From 740eab9a4e6a0e9b37d7a2bcb9c71e4d886f58a5 Mon Sep 17 00:00:00 2001 From: Jan Brodersen <4rmitxes@gmail.com> Date: Thu, 14 Dec 2017 17:28:41 +0100 Subject: [PATCH] [FIX] website_coupon: Wrong indent Fixed indent. Otherwise "amount_final" have a high risk of not being set which causes an Internal Server Error. --- website_coupon/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website_coupon/controllers/main.py b/website_coupon/controllers/main.py index f01032689..506442dbd 100644 --- a/website_coupon/controllers/main.py +++ b/website_coupon/controllers/main.py @@ -125,7 +125,7 @@ class WebsiteCoupon(http.Controller): amount_final += (voucher_val / 100) * line.price_total elif voucher_type == 'all': amount_final = (voucher_val/100) * order.amount_total - res = coupon_product.product_tmpl_id.write({'list_price': -amount_final}) + res = coupon_product.product_tmpl_id.write({'list_price': -amount_final}) value = order._cart_update(product_id=coupon_product.id, set_qty=1, add_qty=1) # updating coupon balance--------------