You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An AttributeError occurs when attempting to submit a Payment Entry in the ERPNext system. This issue arises from a missing attribute treatment_counselling in the NonProfitPaymentEntry object. The error trace indicates that the system is trying to access this attribute during the submission process, leading to the failure.
Steps to Reproduce
Go to the Payment Entry form.
Create a new Payment Entry with the necessary details.
Attempt to submit the Payment Entry.
Current Behavior
The system throws an AttributeError stating that the NonProfitPaymentEntry object does not have the attribute treatment_counselling.
Expected Behavior
The Payment Entry should be submitted without any errors
Module
Integration with ERPNext modules
Version
Frappe Version - v15.36.0
ERPNEXT Version - v15.31.1
Marley Health Version - v16.0.0-dev
Installation method
None
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
returnfrappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 49, 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 1768, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/desk/form/save.py", line 37, in savedocs
doc.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1048, in submit
returnself._submit()
^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1031, in _submit
returnself.save()
^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 337, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 390, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1131, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1322, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1306, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/healthcare/healthcare/healthcare/custom_doctype/payment_entry.py", line 6, in set_paid_amount_in_treatment_counselling
if doc.treatment_counselling and doc.paid_amount:
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NonProfitPaymentEntry' object has no attribute 'treatment_counselling'
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Information about bug
Description
Steps to Reproduce
Current Behavior
The system throws an AttributeError stating that the NonProfitPaymentEntry object does not have the attribute treatment_counselling.
Expected Behavior
The Payment Entry should be submitted without any errors
Module
Integration with ERPNext modules
Version
Frappe Version - v15.36.0
ERPNEXT Version - v15.31.1
Marley Health Version - v16.0.0-dev
Installation method
None
Relevant log output / Stack trace / Full Error Message.
Code of Conduct
The text was updated successfully, but these errors were encountered: