Skip to content

[IMP] brand - brand_use_level should make brand invisible if 'Do not use brands on business document' #263

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

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

baimont
Copy link

@baimont baimont commented Jun 12, 2025

In this commit @AntoniRomera adds

if self.env["res.brand"].check_access_rights("read", raise_exception=False):

I'm not sure why since we have access right res_brand_access_all that gives read access to everyone.

For migration to 18, this has been rewritten to

if self.env["res.brand"].check_access("read"):

This breaks the use of brand_use_level. Tested with demo or admin: we don't pass in that code anymore because check_access return None when you have access. Therefore we never go in the code inside _get_view of brand module. On the web interface, this leads to have the brand_id field always visible, even if in your configuration you say that you do not want to use brand on business document.

@OCA-git-bot
Copy link
Contributor

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

Copy link
Contributor

@marielejeune marielejeune left a comment

Choose a reason for hiding this comment

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

Indeed, the check access on "read" is useless and since it breaks the behavior in v18, let's drop it.

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.

3 participants