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: removed serial no validation for sales invoice #25817

Conversation

rohitwaghchaure
Copy link
Collaborator

As we allowing to inward same serial no multiple times in the PR (#25471), removing the serial no validation in the sales invoice due to which user not able to save the invoice

  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 124, in validate
    self.validate_serial_numbers()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 1093, in validate_serial_numbers
    self.validate_serial_against_sales_invoice()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 1142, in validate_serial_against_sales_invoice
    .format(serial_no, serial_no_details.sales_invoice))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 411, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 390, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 344, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Serial Number: 465793 is already referenced in Sales Invoice: ACC-SINV-2021-06259

@rohitwaghchaure rohitwaghchaure force-pushed the fix-removed-serial-no-validate-for-sales-invoice branch from 7b38432 to b4f0347 Compare May 24, 2021 18:09
@coveralls
Copy link

Pull Request Test Coverage Report for Build 872269468

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 137 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.005%) to 61.211%

Files with Coverage Reduction New Missed Lines %
/home/runner/frappe-bench/apps/erpnext/erpnext/portal/product_configurator/item_variants_cache.py 1 30.0%
/home/runner/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py 13 97.45%
/home/runner/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py 123 77.61%
Totals Coverage Status
Change from base Build 871812420: -0.005%
Covered Lines: 54907
Relevant Lines: 89701

💛 - Coveralls

@rohitwaghchaure rohitwaghchaure merged commit bc7c5bf into frappe:version-13-hotfix May 25, 2021
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.

None yet

2 participants