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][FIX] sale_order_line_input: access to action views #3314

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

Conversation

toita86
Copy link

@toita86 toita86 commented Sep 16, 2024

Previously of this fix when a user with access to all the SO tries to access one of them through the "Open Order" widget there will produce an error:
image

@toita86 toita86 force-pushed the 14.0-FIX-sale_order_line_input-toita86 branch from bfec49c to ad34b52 Compare September 17, 2024 07:26
@toita86 toita86 marked this pull request as ready for review September 17, 2024 08:10
@rousseldenis rousseldenis changed the title [14.0][FIX]sale_order_line: access to action views [14.0][FIX] sale_order_line_input: access to action views Sep 17, 2024
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_window_action_form_user,access_window_action_form_user,base.model_ir_actions_act_window,sale_order_line_input.group_sale_order_access,1,0,0,0
Copy link
Sponsor Contributor

@rousseldenis rousseldenis Sep 17, 2024

Choose a reason for hiding this comment

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

@toita86 You cannot do that as it will give you access to the whole model.

The problem is here: https://github.com/OCA/sale-workflow/blob/14.0/sale_order_line_input/models/sale_order.py#L57

You should change the code to retrieve the action through for_xml_idfunction. Look into core code.

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 the explanation!
I have changed my approach based on your suggestion, now should be correct.

@rousseldenis rousseldenis added this to the 14.0 milestone Sep 17, 2024
@toita86 toita86 force-pushed the 14.0-FIX-sale_order_line_input-toita86 branch 3 times, most recently from eca05ee to c5ab95f Compare September 17, 2024 09:18
@toita86 toita86 force-pushed the 14.0-FIX-sale_order_line_input-toita86 branch from c5ab95f to de3853d Compare September 17, 2024 09:29
Copy link
Contributor

@GSLabIt GSLabIt left a comment

Choose a reason for hiding this comment

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

code

Copy link
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

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

Functional ok!

@rousseldenis what do you say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants