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

fix: Serial Nos not set in the row after scanning in popup #28202

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

marination
Copy link
Collaborator

@marination marination commented Nov 2, 2021

Issue:

  • In Delivery Note/Sales Invoice with update stock, etc. don't add warehouse (parent field)
  • Add a serialised item code. Popup appears
  • Add serial nos simulating a scanner. At the end press enter (go to next line), then click insert
  • Serial nos are not set in the Item row
  • The issue actually occurs on warehouse trigger.
  • In this case since warehouse is not set in the row beforehand, warehouse is set from the popup after clicking on Insert
  • In this trigger if the length of the serial nos in the popup text box != the qty, it clears the serial nos field
  • Umm why was the length not equal? Remember this => At the end press enter (go to next line ? The culprit.
  • This causes serial_nos = ['123', '456', '']. Ideally the length here is 2, but the extra string makes the length 3. Hence not equal to length, hence empty field
    2021-11-02 20 06 55

Fix:

  • Filter out empty strings and whitespaces to get the exact length of serial nos
  • This issue happens even if extra line is added in serial no text box (not in popup) and warehouse is changed, so handled it at warehouse trigger.
    2021-11-02 20 05 13

- Avoid whitspaces while calculating length of serial nos
@marination
Copy link
Collaborator Author

@Mergifyio backport version-13-hotfix

@marination
Copy link
Collaborator Author

@Mergifyio backport version-13-pre-release

@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2021

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2021

backport version-13-pre-release

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2021

backport version-13-hotfix

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2021

backport version-13-pre-release

✅ Backports have been created

marination added a commit that referenced this pull request Nov 2, 2021
…-28202

fix: Serial Nos not set in the row after scanning in popup (backport #28202)
marination added a commit that referenced this pull request Nov 2, 2021
…se/pr-28202

fix: Serial Nos not set in the row after scanning in popup (backport #28202)
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
…-release/pr-28202

fix: Serial Nos not set in the row after scanning in popup (backport frappe#28202)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant