Skip to content

Commit

Permalink
[FIX] website_sale_product_pack: price for pack in shop
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-weiss authored and bruno-zanotti committed Oct 4, 2024
1 parent 2af59c5 commit 7d92402
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions website_sale_product_pack/controllers/variant.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from odoo import http
from odoo.http import request, route

from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantController


class WebsiteSaleVariantController(WebsiteSaleVariantController):
@http.route(
@route(
"/website_sale/get_combination_info",
type="json",
auth="public",
Expand All @@ -18,17 +18,14 @@ def get_combination_info_website(
combination,
add_qty,
parent_combination=None,
**kw,
**kwargs,
):
if "context" in kw:
kw["context"].update({"whole_pack_price": True})
else:
kw["context"] = {"whole_pack_price": True}
request.update_context(whole_pack_price=True)
return super().get_combination_info_website(
product_template_id,
product_id,
combination,
add_qty,
parent_combination=parent_combination,
**kw,
**kwargs,
)

0 comments on commit 7d92402

Please sign in to comment.