erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

Error on cancelling process deferred accounting entry

Open nidhipurohit11 opened this issue 2 years ago • 0 comments

Information about bug

  • Created sales and purchase invoices for an item with deferred income and expense enabled.
  • Created process deferred accounting manually (should get created automatically, but to check 1 scenario created manually)
  • Canceling these entries is throwing server error - "TypeError: make_gl_entries() got an unexpected keyword argument 'gl_entries'"

Screenshot 2022-07-28 at 12 45 21 PM

Module

accounts

Version

ERPNext: v14.0.0-dev (HEAD) Frappe Framework: v14.0.0-dev (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

request.js:438 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 1579, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 37, in cancel
    doc.cancel()
  File "apps/frappe/frappe/model/document.py", line 1017, in cancel
    return self._cancel()
  File "apps/frappe/frappe/model/document.py", line 997, in _cancel
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 298, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 349, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1089, in run_post_save_methods
    self.run_method("on_cancel")
  File "apps/frappe/frappe/model/document.py", line 925, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1265, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1247, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 922, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py", line 37, in on_cancel
    make_gl_entries(gl_entries=gl_entries, cancel=1)
TypeError: make_gl_entries() got an unexpected keyword argument 'gl_entries'

nidhipurohit11 avatar Jul 28 '22 07:07 nidhipurohit11

Fixed on #32054

ruthra-kumar avatar Sep 10 '22 09:09 ruthra-kumar