Hi
I get a server error when submitting expense claim. It was okay before the update (frappe HR). Here are the logs
Server Error
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’
Possible source of error: hrms (app)
App Versions
{ "erpnext": "15.72.3", "frappe": "15.75.0", "hrms": "16.0.0-dev" }Route
Form/Expense Claim/HR-EXP-2025-00031Traceback
Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 115, 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 return frappe.handler.handle() ^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/handler.py", line 51, in handle data = execute_cmd(cmd) ^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/handler.py", line 84, in execute_cmd return frappe.call(method, **frappe.form_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/__init__.py", line 1754, in call return fn(*args, **newargs) ^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/utils/typing_validations.py", line 32, 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 32, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 1093, in submit return self._submit() ^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 1076, in _submit return self.save() ^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 378, in save return self._save(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 431, in _save self.run_post_save_methods() File "apps/frappe/frappe/model/document.py", line 1176, in run_post_save_methods self.run_method("on_submit") File "apps/frappe/frappe/model/document.py", line 1007, in run_method out = Document.hook(fn)(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 1367, in composer return composed(self, method, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 1349, in runner add_to_return_value(self, fn(self, *args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 1004, in fn return method_object(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/hrms/hrms/hr/doctype/expense_claim/expense_claim.py", line 143, in on_submit update_reimbursed_amount(self) File "apps/hrms/hrms/hr/doctype/expense_claim/expense_claim.py", line 408, in update_reimbursed_amount total_amount_reimbursed = get_total_reimbursed_amount(doc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/hrms/hrms/hr/doctype/expense_claim/expense_claim.py", line 430, in get_total_reimbursed_amount amount_via_payment_entry = frappe.db.get_value( ^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/database.py", line 514, in get_value result = self.get_values( ^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/database.py", line 618, in get_values out = self._get_values_from_table( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/database.py", line 876, in _get_values_from_table query = frappe.qb.get_query( ^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/query_builder/utils.py", line 61, in get_query return Engine().get_query(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/query.py", line 74, in get_query self.apply_fields(fields) File "apps/frappe/frappe/database/query.py", line 102, in apply_fields self.fields = self.parse_fields(fields) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/query.py", line 323, in parse_fields _fields.append(ChildQuery(child_field, fields, self.doctype)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/database/query.py", line 488, in __init__ if field.fieldtype not in frappe.model.table_fields: ^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'fieldtype'Request Data
{ "type": "POST", "args": { "doc": "{\"name\":\"HR-EXP-2025-00031\",\"owner\":\"Administrator\",\"creation\":\"2025-07-16 00:09:37.731869\",\"modified\":\"2025-08-04 18:08:09.544815\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"HR-EXP-.YYYY.-\",\"employee\":\"HR-EMP-00002\",\"employee_name\":\"Ed\",\"department\":\"Management\",\"company\":\"Ed Holdings\",\"expense_approver\":\"Administrator\",\"approval_status\":\"Approved\",\"total_sanctioned_amount\":63,\"total_taxes_and_charges\":0,\"total_advance_amount\":0,\"grand_total\":63,\"total_claimed_amount\":63,\"total_amount_reimbursed\":0,\"posting_date\":\"2025-06-24\",\"is_paid\":0,\"payable_account\":\"Creditors - OOH\",\"remark\":\"None\",\"cost_center\":\"Main - OOH\",\"status\":\"Draft\",\"doctype\":\"Expense Claim\",\"expenses\":[{\"name\":\"u8nii9c0\",\"owner\":\"Administrator\",\"creation\":\"2025-07-16 00:09:37.731869\",\"modified\":\"2025-08-04 18:08:09.544815\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":1,\"expense_date\":\"2025-06-23\",\"expense_type\":\"Medical/Clinic\",\"default_account\":\"Administrative Expenses - OOHSB\",\"description\":\"<div class=\\\"ql-editor read-mode\\\"><p><br></p></div>\",\"amount\":63,\"sanctioned_amount\":63,\"cost_center\":\"Main - OOH\",\"parent\":\"HR-EXP-2025-00031\",\"parentfield\":\"expenses\",\"parenttype\":\"Expense Claim\",\"doctype\":\"Expense Claim Detail\"}],\"advances\":[],\"taxes\":[],\"__onload\":{\"make_payment_via_journal_entry\":0,\"self_expense_approval_not_allowed\":0},\"__last_sync_on\":\"2025-08-05T09:45:41.993Z\"}", "action": "Submit" }, "btn": { "jQuery370048413931374136531": { "events": { "click": [ { "type": "click", "origType": "click", "guid": 657, "namespace": "" } ] } } }, "freeze": true, "headers": {}, "error_handlers": {}, "url": "/api/method/frappe.desk.form.save.savedocs", "request_id": null }Response Data
{ "exception": "AttributeError: 'NoneType' object has no attribute 'fieldtype'", "exc_type": "AttributeError", "_exc_source": "hrms (app)" }