-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
refactor: move item_code
reactivity to server-side
#44293
Merged
ruthra-kumar
merged 17 commits into
frappe:develop
from
ruthra-kumar:refactor_transaction_js
Dec 10, 2024
Merged
refactor: move item_code
reactivity to server-side
#44293
ruthra-kumar
merged 17 commits into
frappe:develop
from
ruthra-kumar:refactor_transaction_js
Dec 10, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruthra-kumar
force-pushed
the
refactor_transaction_js
branch
2 times, most recently
from
November 29, 2024 09:16
0687dca
to
c9c1be1
Compare
ruthra-kumar
changed the title
refactor: moving trigger to server
refactor: move Nov 29, 2024
item_code
reactivity to server-side
ruthra-kumar
force-pushed
the
refactor_transaction_js
branch
2 times, most recently
from
December 6, 2024 12:02
f702352
to
263c482
Compare
surajshetty3416
requested changes
Dec 9, 2024
ruthra-kumar
removed
dont-merge
needs-tests
This PR needs automated unit-tests.
Breaking Changes
labels
Dec 10, 2024
ruthra-kumar
force-pushed
the
refactor_transaction_js
branch
from
December 10, 2024 10:37
e4159ea
to
6a26620
Compare
1 to 1 barebones migration
Handle internal parties conversion factor and applying pricing list rate
ruthra-kumar
force-pushed
the
refactor_transaction_js
branch
from
December 10, 2024 12:18
6a26620
to
1467610
Compare
ruthra-kumar
requested review from
rohitwaghchaure
and removed request for
rohitwaghchaure
December 10, 2024 14:35
rohitwaghchaure
approved these changes
Dec 10, 2024
surajshetty3416
approved these changes
Dec 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Selecting an
Item
is the most common action in Sales / Purchase cycle. Whenever an Item is selected, system fetches the basic details like rate, discounts, stock qty, warehouse and sales account as such and auto-fills these details in it's respective fields. This behavior can simply be called as Reactivity.It is achieved by a JS trigger on
item_code
located in transaction.jserpnext/erpnext/public/js/controllers/transaction.js
Line 499 in 5266f23
But, due to a lack of UI test cases, this Reactivity is prone to regression, especially the ones related to discounts and free items. Check #42195 were the broken scenarios are individually identified.
Long-Term Stability and Maintenance
To prevent frequent regression, we've decided to move most of the Reactivity to the server-side, as it allows for server-side tests and a single source to maintain.
This PR is the first in that direction. It moves all of the UI Reactivity associated with
Item
selection server-side.Impacts