Skip to content

Commit

Permalink
Merge PR #987 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 22, 2024
2 parents 71ada89 + d5d3009 commit f60cc4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions website_sale_hide_price/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ def _search_render_results(self, fetch_fields, mapping, icon, limit):
}
)
return results_data

def _website_show_quick_add(self):
website_show_price = (
self.env["website"].get_current_website().website_show_price
)
return (
website_show_price and not self.website_hide_price
) and super()._website_show_quick_add()
8 changes: 0 additions & 8 deletions website_sale_hide_price/views/website_sale_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
</attribute>
</xpath>
</template>
<!-- Hide add to cart button if "Add to cart" option is enabled and not website_show_price -->
<template id="products_add_to_cart" inherit_id="website_sale.products_add_to_cart">
<xpath expr="//a[hasclass('a-submit')]" position="attributes">
<attribute name="t-if">
website.website_show_price and not product.website_hide_price
</attribute>
</xpath>
</template>
<template id="website_search_box" inherit_id="website.website_search_box">
<xpath expr="//input[@name='search']" position="attributes">
<attribute
Expand Down

0 comments on commit f60cc4a

Please sign in to comment.