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

A little issue to hide a menu item #828

Closed
nuxpy opened this issue Mar 15, 2021 · 1 comment
Closed

A little issue to hide a menu item #828

nuxpy opened this issue Mar 15, 2021 · 1 comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@nuxpy
Copy link

nuxpy commented Mar 15, 2021

Hello, in that line I had a problem, I have configured a multi website system and I wanted to apply the conditions in public menus on different websites.

I replaced all from that line until the end of file and put this code:

        visible = False
        if self.env.user.id != menu.website_id.user_id.id and menu.user_logged:
            visible = menu.user_logged
        else:
            visible = menu.user_not_logged
        menu.is_visible = visible

I hope it can be fine for you.

Kind regards.

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant