-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP][FIX] website_sale_product_assortment: handle multiple assortments
This commit changes the way multiple assortments are handled and fixes a couple of bugs in the process. The current version of the module is not able to handle multiple assortments, especially ones that are exclusive (e.g. one assortment with all consumable products and one with all services) and the module seemingly breaks, ignoring the selected rule (e.g. no_show) With these changes, that behaviour is fixed, and additionally assortments for the same website and partner and merged in a logical OR.
- Loading branch information
Showing
7 changed files
with
126 additions
and
34 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
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
36 changes: 36 additions & 0 deletions
36
website_sale_product_assortment/static/src/js/no_show_multifilter_tour.js
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,36 @@ | ||
/* Copyright 2021 Tecnativa - Carlos Roca | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ | ||
odoo.define("website_sale_product_assortment.tour_no_show_multifilter", function ( | ||
require | ||
) { | ||
"use strict"; | ||
|
||
var tour = require("web_tour.tour"); | ||
var base = require("web_editor.base"); | ||
|
||
var steps = [ | ||
{ | ||
trigger: "a[href='/shop']", | ||
extra_trigger: | ||
".o_wsale_product_grid_wrapper:has(a:contains('Test Product 1'))", | ||
}, | ||
{ | ||
trigger: "a[href='/shop']", | ||
extra_trigger: | ||
".o_wsale_product_grid_wrapper:has(a:contains('Test Product 2'))", | ||
}, | ||
]; | ||
|
||
tour.register( | ||
"test_assortment_with_no_show_multifilter", | ||
{ | ||
url: "/shop", | ||
test: true, | ||
wait_for: base.ready(), | ||
}, | ||
steps | ||
); | ||
return { | ||
steps: steps, | ||
}; | ||
}); |
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