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

[MIG] sale_order_line_remove: Migration to 16.0 #2978

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

Conversation

denaux
Copy link

@denaux denaux commented Feb 24, 2024

No description provided.

@denaux denaux mentioned this pull request Feb 24, 2024
100 tasks
@rousseldenis
Copy link
Contributor

/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(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why sudo() here ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@JoanSForgeFlow Your advice here ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

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