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: Handle Account and Item None not found in Opening Invoice Creation Tool #23559

Merged

Conversation

marination
Copy link
Collaborator

Issue:

Account None not found

  • The following is visible on trying to create invoices via Opening Invoice Creation Tool
    image
  • This happens as it tries to set the Debit To/Credit To account in Sales/Purchase Invoice
  • get_party_account handles fetching this account based on Customer/Supplier
  • If no account exists against Customer/Supplier or Customer Group/Supplier Group or Company then get_party_account gets no value
  • frappe.db.get_value in validate_credit_to_acc gets None as an argument, hence the error

Item None not found

  • If Update Item is set to default as 1(in the doctype specification), then it tried creating an SLE for such an Invoice via Opening Invoice Creation Tool
  • Item Code is not set via Opening Invoice Creation Tool, this is bound to break
  • Similar error for Item

Fix:

  • While validating debit/credit account if it has no value , try setting it again. If still no value, prompt user to set it somewhere:
    Screenshot 2020-10-08 at 7 07 31 PM
  • Make sure no SLE creation is initiated if via Opening Invoice Creation Tool, set update_stock to 0

@marination marination added CI-failing Unit tests or patch tests are failing. needs-tests This PR needs automated unit-tests. labels Oct 8, 2020
@deepeshgarg007 deepeshgarg007 self-assigned this Oct 10, 2020
@marination marination removed the CI-failing Unit tests or patch tests are failing. label Oct 14, 2020
@marination marination removed the needs-tests This PR needs automated unit-tests. label Nov 3, 2020
@marination marination force-pushed the debit-credit-opening-invoice-tool branch from 9265632 to 53b1a9a Compare November 3, 2020 10:24
@marination marination added the CI-failing Unit tests or patch tests are failing. label Nov 5, 2020
@marination marination force-pushed the debit-credit-opening-invoice-tool branch 2 times, most recently from ef7284c to c866abc Compare December 4, 2020 14:39
@marination marination removed the CI-failing Unit tests or patch tests are failing. label Dec 4, 2020
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.

3 participants