Browse Source
[FIX] website_coupon: Wrong indent
Fixed indent. Otherwise "amount_final" have a high risk of not being set which causes an Internal Server Error.
pull/45/head
Jan Brodersen
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
website_coupon/controllers/main.py
|
@ -125,7 +125,7 @@ class WebsiteCoupon(http.Controller): |
|
|
amount_final += (voucher_val / 100) * line.price_total |
|
|
amount_final += (voucher_val / 100) * line.price_total |
|
|
elif voucher_type == 'all': |
|
|
elif voucher_type == 'all': |
|
|
amount_final = (voucher_val/100) * order.amount_total |
|
|
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) |
|
|
value = order._cart_update(product_id=coupon_product.id, set_qty=1, add_qty=1) |
|
|
|
|
|
|
|
|
# updating coupon balance-------------- |
|
|
# updating coupon balance-------------- |
|
|