[FIX] e-commerce : pricefilter activated only when needed

In the website edition mode, the pricefilter option was displayed even if the attributes were not (top and left). The pricefilter was also depended on the fact that the user was displaying categories or not. After improvement, the pricefilter only depends on the attributes display (top or/and left).

Also, if the attributes are activated and only displayed on the top part of the website, then the pricefilter (if activated) should also be displayed only on the top part, and not on the left anymore.

task-3092992

closes odoo/odoo#108934

X-original-commit: b4c3548736f6c19d10a3fc4f358e7303f02d8a81
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
Lucas Vermeulen (luve)
2023-01-02 20:39:44 +01:00
committed by luve-odoo
parent 7e0395feb1
commit 6be2f70759
2 changed files with 2 additions and 3 deletions
@@ -113,7 +113,7 @@
<we-checkbox string="Price Filter"
class="o_we_sublevel_1"
data-customize-website-views="website_sale.filter_products_price"
data-dependencies="categories_opt, attributes_opt"
data-dependencies="attributes_opt, attributes_opt_top"
data-no-preview="true"
data-reload="/"/>
<we-row string="Top Bar" class="o_we_full_row">
+1 -2
View File
@@ -298,7 +298,7 @@
<t t-call="website_sale.products_categories_list"/>
</div>
<div class="products_attributes_filters"/>
<t t-if="opt_wsale_filter_price and (not opt_wsale_attributes)"
<t t-if="opt_wsale_filter_price and opt_wsale_attributes"
t-call="website_sale.filter_products_price"/>
</div>
</aside>
@@ -841,7 +841,6 @@
</div>
</t>
</form>
<t t-if="opt_wsale_filter_price and opt_wsale_attributes" t-call="website_sale.filter_products_price"/>
</div>
</xpath>
</template>