-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][FIX] website_sale_product_pack: detailed displayed components …
…price on website
- Loading branch information
1 parent
820f59e
commit 94911f8
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import models | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import variant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from odoo import http | ||
|
||
from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantController | ||
|
||
|
||
class WebsiteSaleVariantController(WebsiteSaleVariantController): | ||
@http.route( | ||
["/sale/get_combination_info_website"], | ||
type="json", | ||
auth="public", | ||
methods=["POST"], | ||
website=True, | ||
) | ||
def get_combination_info_website( | ||
self, product_template_id, product_id, combination, add_qty, **kw | ||
): | ||
if "context" in kw: | ||
kw["context"].update({"whole_pack_price": True}) | ||
else: | ||
kw["context"] = {"whole_pack_price": True} | ||
return super(WebsiteSaleVariantController, self).get_combination_info_website( | ||
product_template_id, product_id, combination, add_qty, **kw | ||
) |