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

perf: Ignore is_opening column in GL Queries (backport #45327) #45785

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 7, 2025

Is Opening column allows users to add opening entries irrespective of posting date and fiscal year.
This should not ideally be allowed after the balance sheet is frozen for the first fiscal year in the system.

This column is used in all queries for getting opening balance, one more side effect this column has is since the posting date can be any date, the tables cannot be logically partitioned based on the posting date to make queries efficient. Once the user reaches large volume of data in GL Entry, these queries take a lot of time to execute and sometimes more than the report timeout limit.

Added a check to ignore this column in queries, once the user has imported all opening entries with posting date before the date system actually came to use with live entries, this column becomes irrelevant.

image


This is an automatic backport of pull request #45327 done by [Mergify](https://mergify.com).

* perf: Ignore is_opening column in GL Queries

* chore: Remove unwanted changes

* chore: Remove unwanted changes

* chore: Remove unwanted changes

* chore: Remove unwanted changes

* chore: Remove unwanted changes

* chore: Remove unwanted changes

(cherry picked from commit 993f40f)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.py
Copy link
Contributor Author

mergify bot commented Feb 7, 2025

Cherry-pick of 993f40f has failed:

On branch mergify/bp/version-14-hotfix/pr-45327
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 993f40fa43.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/accounts/report/financial_statements.py
	modified:   erpnext/accounts/report/general_ledger/general_ledger.py
	modified:   erpnext/accounts/report/trial_balance/trial_balance.json
	modified:   erpnext/accounts/report/trial_balance/trial_balance.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/doctype/accounts_settings/accounts_settings.json
	both modified:   erpnext/accounts/doctype/accounts_settings/accounts_settings.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Feb 7, 2025
@ruthra-kumar ruthra-kumar force-pushed the mergify/bp/version-14-hotfix/pr-45327 branch from 61c1603 to 222bd93 Compare February 7, 2025 10:09
@ruthra-kumar ruthra-kumar merged commit 09cefd9 into version-14-hotfix Feb 7, 2025
10 checks passed
@ruthra-kumar ruthra-kumar deleted the mergify/bp/version-14-hotfix/pr-45327 branch February 7, 2025 11:46
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.82.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants