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

Syncing from upstream Vauxoo/addons-vauxoo (15.0) #335

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

bt-admin
Copy link

bt_gitbot

There's a migration script to recompute sales marging on sale order
lines, which was raising memory errors with databases that contain many
lines.

The following optimizations are applied:
- Don't call compute method directly but mark the field to be computed.
  This avoids one write per record and makes the ORM to take care of
  batches.
- Read currency directly from the line, instead of from the pricelist
  which in turn requires reading the order.
- Don't read currency if quantity is zero as it won't be used anyway
@bt-admin bt-admin added the 15.0 label Jul 11, 2024
@bt-admin bt-admin merged commit 0631390 into brain-tec:15.0 Jul 11, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants