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

repay from salary #146

Open
1 task done
adhennon opened this issue Dec 1, 2023 · 1 comment
Open
1 task done

repay from salary #146

adhennon opened this issue Dec 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@adhennon
Copy link

adhennon commented Dec 1, 2023

Information about bug

repay from salary checkbox was removed from loan doctype in erp next version 14 but we still get issues when submitting loan doctype like this one

AttributeError: 'Loan' object has no attribute 'repay_from_salary'

Module

Loan Management

Version

ERPNext: v14.46.1 (version-14)

Frappe Framework: v14.54.0 (version-14)

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "14.46.1",
	"frappe": "14.54.0",
	"hrms": "16.0.0-dev"
}

Route

Form/Loan/new-loan-myogzjlkmu

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, 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 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1622, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 309, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 331, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 262, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1055, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 919, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1281, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1265, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/hrms/hrms/hr/utils.py", line 687, in validate_loan_repay_from_salary
    if doc.applicant_type == "Employee" and doc.repay_from_salary:
AttributeError: 'Loan' object has no attribute 'repay_from_salary'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@adhennon adhennon added the bug Something isn't working label Dec 1, 2023
@kittiu
Copy link
Contributor

kittiu commented Feb 14, 2024

I got the same error on Version 15

image

Currently, I have to add back this field to remove the error from my productoin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants