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][IMP] base_group_backend: allow read on calendar.event and remove Dashboard menu for backend users #326

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

clementmbr
Copy link
Member

Hi @bealdav @petrus-v @FranzPoize @tansadio

I tried to use the base_group_backend module in a very basic Odoo 16 instance with few modules installed like sale.

It appeared that I had a non-blocking Error message displaying (and disappear instantly) everytime I load a page, because of some missing access on calendar.event and calendar.attendee models.
I also had a non-desired dashboard menu from the spreadsheet_dashboard module.

I don't know if these problem appeared because of some recent updates on Odoo 16 or just because of the sale module.

I know it's better to avoid unnecessary dependencies as much as possible, and as this module doesn't need the sale module to work, it could be theoretically better to make a glue module to solve these problems only "in the case of the sale module installed"...

But I though that as the modules calendar and spreadsheet_dashboard are so basic and used as a dependency in so many modules, it could be easier to add this fix directly on the base_group_backend without the use of a glue module.

Is it ok for you?

cc @sebastienbeau and #314 #205

@OCA-git-bot
Copy link
Contributor

Hi @FranzPoize, @bealdav,
some modules you are maintaining are being modified, check this out!

@clementmbr clementmbr force-pushed the 16-imp-base-group-backend branch from 9f1a9be to bdb7051 Compare December 20, 2024 16:43
@bealdav
Copy link
Member

bealdav commented Dec 23, 2024

I suppose @petrus-v have a strong opinion here. On my side I'm shared between the 2 options.
If no other answer I vote for your suggestion to be pragmatic but I prefer let others decide here.

@petrus-v
Copy link

Same I feel it's a bit shame to add dependency to spreadsheet_dashboard as long sale can leave without spreadsheet_dashboard_sale but won't really oppose as long new access right are properly based on group backend_ui_users which is good to me. We can split it later if someone needs !

@pedrobaeza
Copy link
Member

I don't think this module should depend on spreadsheet_dashboard. Any possible extra module adding a wildcard menu will have the same problem. You need to find another solution for not showing extra things in this group. Maybe an allowed list based system in the method that populates the menus.

@clementmbr clementmbr force-pushed the 16-imp-base-group-backend branch from bdb7051 to edf95cf Compare January 14, 2025 19:56
@clementmbr
Copy link
Member Author

clementmbr commented Jan 14, 2025

@pedrobaeza thanks for your suggestion.
Thinking about it, it appeared to me that it could me more convenient to only avoid displaying root menus without security groups (for our backend UI users). Do you agree?

I made new commits following this idea. Please approve the changes if it's ok for you! :)

cc @petrus-v @bealdav

@pedrobaeza
Copy link
Member

Well, that way I think that you will remove some useful ones. Have an allowed list for being able to customize it.

@clementmbr
Copy link
Member Author

clementmbr commented Jan 14, 2025

@pedrobaeza

Well, that way I think that you will remove some useful ones. Have an allowed list for being able to customize it.

What kind of list are you thinking about?

When you talked about it I first though of a list in a dedicated function like get_visible_root_menu() that would have to be override in the custom module in order to add the menus you want to make visible.

But, I thought it could be easier (and more intuitive) to just add the group of your Backend UI User to the menu you want to display (if there is any menu with no groups that you want to display, you just add your User's group to it).

I mean that it seemed more natural (and clear) to list my visible menus in the views.xml file of my custom module than overriding a function, but if you think of a better way of "listing" these visible menus, I'll be pleased to hear it.

Thanks!

@clementmbr clementmbr requested a review from petrus-v January 14, 2025 20:48
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.

5 participants