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

[15.0][FIX] sale_order_revision: Users can access the smart button Prev. revision #2615

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

ps-tubtim
Copy link
Member

@ps-tubtim ps-tubtim commented Jul 22, 2023

Fix the error when another user clicks the smart button Prev. revision on sale.order view.

Selection_116

@@ -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]
Copy link
Contributor

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)

Copy link
Member Author

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.

@ps-tubtim ps-tubtim force-pushed the 15.0-fix-sale_order_revision branch from 64a368d to c8afe2d Compare July 26, 2023 06:37
@ps-tubtim ps-tubtim force-pushed the 15.0-fix-sale_order_revision branch from c8afe2d to a71e252 Compare July 26, 2023 06:41
@ps-tubtim ps-tubtim changed the title [15.0][FIX] sale_order_revision: sudo action [15.0][FIX] sale_order_revision: User can access the smart button Prev. revision Jul 26, 2023
@ps-tubtim ps-tubtim changed the title [15.0][FIX] sale_order_revision: User can access the smart button Prev. revision [15.0][FIX] sale_order_revision: Users can access the smart button Prev. revision Jul 26, 2023
@rousseldenis
Copy link
Contributor

@ps-tubtim I will fix pre-commit with #2617. Just rebase when merged

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-2615-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 7cc9a86 into OCA:15.0 Jul 26, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6fc5c8c. Thanks a lot for contributing to OCA. ❤️

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.

5 participants