Browse Source

Apr 4 [UPDT] : Bug Fixed 'refer_friend_and_earn'

pull/278/merge
AjmalCybro 1 year ago
parent
commit
222a245891
  1. 2
      refer_friend_and_earn/__manifest__.py
  2. 4
      refer_friend_and_earn/controllers/refer_friend_and_earn.py
  3. 2
      refer_friend_and_earn/models/apply_discounts.py

2
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

4
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

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

Loading…
Cancel
Save