Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multi_company_menu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
multi_company_menu
Commits
4ea42822
Commit
4ea42822
authored
4 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[fix] error company rights
parent
c34a80bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/ir_ui_menu.py
+5
-2
5 additions, 2 deletions
models/ir_ui_menu.py
with
5 additions
and
2 deletions
models/ir_ui_menu.py
+
5
−
2
View file @
4ea42822
...
@@ -30,7 +30,10 @@ class IrUiMenuMultiCompany(models.Model):
...
@@ -30,7 +30,10 @@ class IrUiMenuMultiCompany(models.Model):
menu_ids
=
self
.
browse
(
list
(
menus
))
menu_ids
=
self
.
browse
(
list
(
menus
))
visible_menu_ids
=
menu_ids
visible_menu_ids
=
menu_ids
company_id
=
self
.
env
.
user
.
company_id
company_id
=
self
.
env
.
user
.
company_id
for
menu
in
menu_ids
:
specific_menu_ids
=
menu_ids
.
sudo
().
filtered
(
if
menu
.
company_ids
and
company_id
not
in
menu
.
company_ids
:
lambda
m
:
m
.
company_ids
)
for
menu
in
specific_menu_ids
:
if
company_id
not
in
menu
.
company_ids
:
visible_menu_ids
=
visible_menu_ids
-
menu
visible_menu_ids
=
visible_menu_ids
-
menu
return
set
(
visible_menu_ids
.
ids
)
return
set
(
visible_menu_ids
.
ids
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment