Skip to content

Conversation

@alvaroGC-S73
Copy link
Contributor

@alvaroGC-S73 alvaroGC-S73 commented Dec 11, 2025

The invoice search in the Intrastat declaration has been modified to optimize performance on large databases.
Previously, the query caused memory errors due to loading too many records and relational fields.
Now, with_context(prefetch_fields=False) avoids unnecessary prefetch and significantly improving the action's speed and memory consumption.
I have attached comparative screenshots showing the response time before and after the change.

  • Before changes with limit 10.000 (12,7 GB):
imagen
  • After changes without limit (1,3 GB):
imagen

@Reyes4711-S73
Copy link

LGTM

Copy link

@Segui-S73 Segui-S73 left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@Reyes4711-S73
Copy link

@OCA/intrastat-maintainers Please, can you review/merge this PR?

@pedrobaeza pedrobaeza added this to the 18.0 milestone Dec 16, 2025
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

Makes sense

@etobella
Copy link
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-329-by-etobella-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 242a020 into OCA:18.0 Dec 21, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 750abe1. 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.

6 participants