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

[16.0][MIG] website_menu_by_user_status: Migration to 16.0 #1049

Merged
merged 25 commits into from
Oct 11, 2024

Conversation

alejandro-vallejoFL
Copy link

@alejandro-vallejoFL alejandro-vallejoFL commented Jul 30, 2024

This PR has two objectives: to make a standard migration of the website_menu_by_user_status module to v16.0 and fix a bug related to the visibility of website menus:

The _compute_visible method of the core calculates the is_visible field based on certain conditions, such as that the linked page is published.
This method calls the super of this method, and if after doing so the menu entry is not visible, it is saved as not visible, but then it is made visible if it is visible to logged in or non-logged in users.

Let's see an example:

This page is not published:

PageNotPublished

We added a menu that links to the previous page. By default, the visible checks are marked for logged in and non-logged in users:

ConfigVisible

With these settings, the menu is displayed and directed to the page, giving an error as it is not published:

Error

This PR is responsible for fixing that error.

FL-556-1335

Jordi Riera and others added 25 commits July 19, 2024 11:48
Extending the controllers and the website xml templates is not required anymore because the
field is_visible on website.menu is computed.
Currently translated at 100.0% (5 of 5 strings)

Translation: website-13.0/website-13.0-website_menu_by_user_status
Translate-URL: https://translation.odoo-community.org/projects/website-13-0/website-13-0-website_menu_by_user_status/es/
Currently translated at 100.0% (5 of 5 strings)

Translation: website-13.0/website-13.0-website_menu_by_user_status
Translate-URL: https://translation.odoo-community.org/projects/website-13-0/website-13-0-website_menu_by_user_status/ca/
[FIX][website_menu_by_user_status] fix travis

[FIX][website_menu_by_user_status] force sudo

Revert "[FIX][website_menu_by_user_status] force sudo"

This reverts commit 71d579c.
Currently translated at 100.0% (8 of 8 strings)

Translation: website-14.0/website-14.0-website_menu_by_user_status
Translate-URL: https://translation.odoo-community.org/projects/website-14-0/website-14-0-website_menu_by_user_status/es_AR/
Currently translated at 100.0% (8 of 8 strings)

Translation: website-14.0/website-14.0-website_menu_by_user_status
Translate-URL: https://translation.odoo-community.org/projects/website-14-0/website-14-0-website_menu_by_user_status/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: website-14.0/website-14.0-website_menu_by_user_status
Translate-URL: https://translation.odoo-community.org/projects/website-14-0/website-14-0-website_menu_by_user_status/
…funcionality.

There was a bug that changes how the core works and allowed access to
an unpublished page from one of its menus if it is set to visible to
your logged-in or non-logged-in users, taking us to an error page
@danielduqma
Copy link

cc @OCA/website-maintainers

@tarteo
Copy link
Member

tarteo commented Oct 11, 2024

LGTM! Thanks (tested locally)

@tarteo
Copy link
Member

tarteo commented Oct 11, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1049-by-tarteo-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f01fcdc into OCA:16.0 Oct 11, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at bb56a29. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.