From 222a24589129b645c00bdb5ae2f6dafeb295e48a Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Thu, 4 Apr 2024 13:08:26 +0530 Subject: [PATCH] Apr 4 [UPDT] : Bug Fixed 'refer_friend_and_earn' --- refer_friend_and_earn/__manifest__.py | 2 +- refer_friend_and_earn/controllers/refer_friend_and_earn.py | 4 ++-- refer_friend_and_earn/models/apply_discounts.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/refer_friend_and_earn/__manifest__.py b/refer_friend_and_earn/__manifest__.py index a522cbde1..87e870f47 100644 --- a/refer_friend_and_earn/__manifest__.py +++ b/refer_friend_and_earn/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': 'Refer and Earn', - 'version': '16.0.1.0.0', + 'version': '16.0.1.0.1', 'category': 'Website', 'summary': """ Refer your friend by using referral code and have points while they log in with that referral code. According to the diff --git a/refer_friend_and_earn/controllers/refer_friend_and_earn.py b/refer_friend_and_earn/controllers/refer_friend_and_earn.py index 107fc5bf1..3028a8361 100644 --- a/refer_friend_and_earn/controllers/refer_friend_and_earn.py +++ b/refer_friend_and_earn/controllers/refer_friend_and_earn.py @@ -186,7 +186,7 @@ class WebsiteSale(WebsiteSale): def cart_update_json(self, *args, set_qty=None, **kwargs): """This function will work when we have some updates from the cart, ie, add or delete the products from the cart""" - super().cart_update_json(*args, set_qty=set_qty, **kwargs) + res = super().cart_update_json(*args, set_qty=set_qty, **kwargs) total_price = sum(request.website.sale_get_order().order_line.mapped( 'price_subtotal')) discount_order_line_id = 0 @@ -216,7 +216,7 @@ class WebsiteSale(WebsiteSale): order_line.write({ 'price_unit': order_line_discount_price, }) - return http.request.redirect(http.request.httprequest.url) + return res def shop_payment_confirmation(self, **post): """This function is used to decrease the applied points from the diff --git a/refer_friend_and_earn/models/apply_discounts.py b/refer_friend_and_earn/models/apply_discounts.py index 967f5ee8d..e70b26b1b 100644 --- a/refer_friend_and_earn/models/apply_discounts.py +++ b/refer_friend_and_earn/models/apply_discounts.py @@ -12,7 +12,7 @@ # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details . # # You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # (LGPL v3) along with this program.