-
Notifications
You must be signed in to change notification settings - Fork 29.9k
[FIX] website_sale: Remove original price if prevent sale #202867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] website_sale: Remove original price if prevent sale #202867
Conversation
80bf8b7
to
b8f48e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also remove the compare_list_price
from the combination_info
, as it'll be sent to the client even if it's not displayed, regardless of whether the section is there or not.
b8f48e2
to
66d45c0
Compare
66d45c0
to
9b0fd81
Compare
If prevent zero sale is active, prices should be hidden from the page opw-4650460
9b0fd81
to
8e18aaa
Compare
<div | ||
t-if="not combination_info['prevent_zero_price_sale']" | ||
itemprop="offers" | ||
itemscope="itemscope" | ||
itemtype="http://schema.org/Offer" | ||
t-attf-class="product_price mt-2 mb-3 d-inline-block" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will also hide rental/subscription prices if the product sales price is 0 👀 (and the rental/sub prices aren't).
I believe we should update the overrides of _get_combination_info
in website_sale_subscription
and website_sale_renting
to update prevent_zero_price_sale
(it seems they never considered it at all :D).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for website_sale_renting
they hide the div anyways if its rental so there's no impact there
<xpath expr="//div[@itemprop='offers']" position="attributes">
<attribute name="t-attf-class" separator=" " add="{{'o_hidden' if combination_info.get('is_rental') else ''}}"/>
</xpath>
I will add a check in website_sale_subscription
so I can either leave website_sale_rental
untouched or I can add the same check for consistency there as well what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, there is no issue with rental 👌
If it's not too complex, I'd say that the same check could be added in both modules to keep both logics similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo delegate+
@robodoo r+ |
If prevent zero sale is active, prices should be hidden from the page opw-4650460 closes #202867 Related: odoo/enterprise#82082 Signed-off-by: Lina Eweis (liew) <liew@odoo.com>
Partially reverted in #204524 |
If prevent zero sale is active, prices should be hidden from the page
opw-4650460
See also: https://github.com/odoo/enterprise/pull/82082
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr