-
-
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
[MIG] sale_order_line_remove: Migration to 16.0 #2978
base: 16.0
Are you sure you want to change the base?
Conversation
/ocabot migration sale_order_line_remove |
and not line.invoice_lines | ||
and not line.move_ids.filtered(lambda move: move.state == "done") | ||
) | ||
invoiced_lines = self.sudo().filtered( |
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.
Why sudo() here ?
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.
@JoanSForgeFlow Your advice here ?
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.
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 Using sudo() addressed access issues, ensuring all possible lines are found and filtered. Since this sudo() is used to raise an error and prevent deletion, it actually makes the process more secure.
No description provided.