-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[15.0][FIX] sale_order_revision: Users can access the smart button Prev. revision #2615
[15.0][FIX] sale_order_revision: Users can access the smart button Prev. revision #2615
Conversation
@@ -35,7 +35,7 @@ def _prepare_revision_data(self, new_revision): | |||
def action_view_revisions(self): | |||
self.ensure_one() | |||
action = self.env.ref("sale.action_orders") | |||
result = action.read()[0] | |||
result = action.sudo().read()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ps-tubtim Nope, you should use _for_xml_id() instead (Look after into code for examples)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rousseldenis Thank you for your suggestion. I already updated it.
64a368d
to
c8afe2d
Compare
c8afe2d
to
a71e252
Compare
@ps-tubtim I will fix pre-commit with #2617. Just rebase when merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge patch
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 6fc5c8c. Thanks a lot for contributing to OCA. ❤️ |
Fix the error when another user clicks the smart button Prev. revision on sale.order view.