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

[14.0] sale_blanket_orders: Open window action requires sudo #1978

Closed
janikvonrotz opened this issue Apr 12, 2022 · 2 comments
Closed

[14.0] sale_blanket_orders: Open window action requires sudo #1978

janikvonrotz opened this issue Apr 12, 2022 · 2 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@janikvonrotz
Copy link

janikvonrotz commented Apr 12, 2022

Getting the window action by ref will fail for user which do not have administrator permissions:

action = self.env.ref("sale.action_orders").read()[0]

Workaround:

Add read permissions for internal users.

Screenshot from 2022-04-12 09-22-40

Proposal:

Use sudo() before read().

Next steps:

Let me know if this is correct and I will create a PR.

@rousseldenis
Copy link
Sponsor Contributor

rousseldenis commented Apr 13, 2022

@janikvonrotz Thanks. But no, the good way is to use self.env["ir.actions.act_window"]._for_xml_id(<action>). Could you do the PR ?

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 Apr 14, 2024
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

2 participants