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

Accounting Dimension DocType issue #35450

Closed
IshwaryaM3 opened this issue May 29, 2023 · 1 comment · Fixed by #35487
Closed

Accounting Dimension DocType issue #35450

IshwaryaM3 opened this issue May 29, 2023 · 1 comment · Fixed by #35487
Labels

Comments

@IshwaryaM3
Copy link

Information about bug

Hi,

We have created doctypes like IT maintenance and FOLK Residency etc (First Word - all in Caps (IT, FOLK) ). And we used these doctypes as accounting dimensions and those accounting dimensions fields got created in Journal Entry doctype. Now when we try to submit the Journal Entry record with these accounting dimension values we are getting a server error because of the name of the DocType. So in the backend (erpnext code), the doctype name is converted as It Maintenance and Folk Residency (with only First Letter Caps). Here is the traceback and the server error what we are getting.

request.js:462 Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1585, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 21, in savedocs
doc.submit()
File "apps/frappe/frappe/model/document.py", line 1021, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 1000, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 303, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 354, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1096, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 930, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1277, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1259, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 927, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py", line 82, in on_submit
self.make_gl_entries()
File "apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py", line 837, in make_gl_entries
make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj, update_outstanding=update_outstanding)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 45, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 292, in save_entries
make_entry(entry, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 306, in make_entry
validate_expense_against_budget(args)
File "apps/erpnext/erpnext/accounts/doctype/budget/budget.py", line 138, in validate_expense_against_budget
lft, rgt = frappe.db.get_value(doctype, args.get(budget_against), ["lft", "rgt"])
TypeError: cannot unpack non-iterable NoneType object

Screenshot from 2023-05-26 14-51-24

Screenshot from 2023-05-26 14-53-27

Module

accounts

Version

Frappe Version - v14.31.0 (HEAD)
ERPNext Version - v14.16.1 (HEAD)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

No response

@IshwaryaM3 IshwaryaM3 added the bug label May 29, 2023
@IshwaryaM3
Copy link
Author

Steps to Reproduce the issue:

  1. Created Doctype IT Maintenance as a tree structure.
    Screenshot from 2023-05-29 12-55-17
  2. Created a accounting dimension record for IT Maintenance.
    Screenshot from 2023-05-29 12-56-29
  3. Create Journal Entry with IT Maintenance accounting dimension value.
  4. Submit the Journal Entry

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant