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

Fix permissions issue when clicking phonecalls in crm.lead #596

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

Conversation

PNurm
Copy link

@PNurm PNurm commented Sep 16, 2024

No description provided.

@@ -25,7 +25,7 @@ def _compute_phonecall_count(self):

def button_open_phonecall(self):
self.ensure_one()
action = self.env.ref("crm_phonecall.crm_case_categ_phone_incoming0")
action = self.env.ref("crm_phonecall.crm_case_categ_phone_incoming0").sudo()
Copy link
Member

Choose a reason for hiding this comment

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

The usual thing to do in these cases is to use _for_xml_id method instead of ir.model.data for reading in one shot without permissions problem the action.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for correcting. I pushed a commit with the correction applied.

@PNurm
Copy link
Author

PNurm commented Nov 11, 2024

Can this be merged now?

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.

2 participants