Skip to content
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

[18.0] [MIG] website_sale_hide_price: Migration to 18.0 #989

Open
wants to merge 50 commits into
base: 18.0
Choose a base branch
from

Conversation

Borruso
Copy link

@Borruso Borruso commented Nov 29, 2024

Migration from 17.0 to 18.0

Issue: #974

chienandalu and others added 30 commits November 29, 2024 13:14
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-11.0/e-commerce-11.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_hide_price/fa/
Currently translated at 75.0% (3 of 4 strings)

Translation: e-commerce-11.0/e-commerce-11.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_hide_price/de/
…event show prices in cart (OCA#244)

* Add to cart hidden if not website_show_price
* Hide quantity selector
* bump version and added contributor
Currently translated at 50.0% (2 of 4 strings)

Translation: e-commerce-11.0/e-commerce-11.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_hide_price/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_hide_price/de/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_hide_price/sl/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_hide_price/ca/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_hide_price/es/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-14.0/e-commerce-14.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-14-0/e-commerce-14-0-website_sale_hide_price/es_AR/
No we can hide the price only for the products we want to.

TT36129
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/it/
Currently translated at 100.0% (11 of 11 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/es_AR/
Currently translated at 100.0% (11 of 11 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/pt/
pilarvargas-tecnativa and others added 19 commits November 29, 2024 13:14
When editing the website, a problem was encountered when inserting and
editing the dynamic product snippet. When changing the filter to
"product accessories" or "recently sold products", an error occurred
accessing the "website_hide_price" key if it didn't exist. The solution
involves modifying the access to the "website_hide_price" key, thus
avoiding the mentioned error. With this correction, the proper
functioning of dynamic product snippets is guaranteed.

TT43493
Hide add to cart button and prices from dynamic product snippet
templates if not website_show_price

When inheriting templates from the snippet, they were duplicated in
the web editor selector. To avoid this, they have been defined in "data"
like odoo does and the id's of the child templates have been modified.

TT43493
When the "add_to_cart" option was activated, the add to cart button
was not hidden and the product could be added and this functionality
has been corrected.
The same applies to the "Buy Now Button" option.

TT41911
Currently translated at 100.0% (11 of 11 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/de/
Currently translated at 100.0% (11 of 11 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/es/
[FIX] website_sale_hide_price update t-cache for updating template
Currently translated at 100.0% (11 of 11 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/ja/
Currently translated at 100.0% (14 of 14 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/es/
Currently translated at 100.0% (14 of 14 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_hide_price/es_AR/
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-17.0/e-commerce-17.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_hide_price/it/
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-17.0/e-commerce-17.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_hide_price/it/
Fix caching of the website_sale.products view override.

Before this commit, this module added a view that added two price website related cache keys to the products grid wrapper. In Odoo 17.0, caching was removed for this element. In combination with this module, this resulted in re-rendering this portion of the view, only depending on the cache keys added by this module. Because of it, searched products didn't update when changing any of the search parameters.

This commit fixes it, by removing that override, and leaving the elements cache disabled.
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-17.0/e-commerce-17.0-website_sale_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_hide_price/sv/
Replaced view inheritance with Python logic in _website_show_quick_add
to fix an issue where the "Add to Cart" button visibility was
incorrectly overridden by this module. This update restores the
expected behavior by ensuring the inherited logic determines button
visibility.
website_hide_price = fields.Boolean(
string="Hide prices on website",
related="website_id.website_hide_price",
readonly=False,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove readonly

)
website_hide_price_default_message = fields.Char(
related="website_id.website_hide_price_default_message",
readonly=False,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runboat works good but take a look of the comments @Borruso

@Borruso Borruso force-pushed the 18.0-mig-website_sale_hide_price branch from bc4a9cf to c0a2382 Compare December 10, 2024 15:13
@Borruso Borruso force-pushed the 18.0-mig-website_sale_hide_price branch from c0a2382 to 70ddfa0 Compare December 10, 2024 15:15
@Borruso
Copy link
Author

Borruso commented Dec 10, 2024

@peluko00 thanks for review!

@Borruso Borruso requested a review from peluko00 December 10, 2024 15:15
Copy link

@peluko00 peluko00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested in runboat and code review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.