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
parent
commit
740eab9a4e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      website_coupon/controllers/main.py

2
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--------------

Loading…
Cancel
Save