ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Expense Claim Challenge


#1

I just updated to version 11 and I found out I can no longer raise expense claims.

The form appears to be asking for an expense approver, but when I get to the expense approver field no user is available to be chosen.

I have created users with Expense Approver rights.

Has anyone else has this challenge ? what setting am I missing?

Would appreciate some insight.


#2

Honestly, I am not sure what is the point of the Expense Approver field at all! The ERPNext team shouldn’t have carried the old Expense Approver logic into V11 in my opinion! This ought to have been deprecated and completely replaced with a default workflow

The logic of users selecting one approver from a list of all users with Expense Approver role is archaic and not used in most organizations; usually you’ll have more than one person who can give final approval and one or two other levels of approval in-between based on department, amount being claimed etc… worse still, the old logic interferes with workflow!

I know the team was working on this so I hope the Expense Approver field will be a thing of the past very very soon!

Kind regards,


#3

In the Employee, update “reports to”. That approver should be selectable for the user. Par try this and confirm if it works.


#4

Hi @umair

It does not work, and I would have been even more worried if it does.

The fact that I report to someone in my company does not mean that the person has the power to approve expenses. This might be true in small companies but not in larger ones .

However updating ¨report to¨ did not work, users are still not showing up in the approver field in the expense claim form.

Regards


#5

FWIW the following is the error message get

Traceback (most recent call last):
File “/home/ubuntu/xlevel/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 296, in _save
self.run_before_save_methods()
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 877, in run_before_save_methods
self.run_method(“before_save”)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 1033, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/ubuntu/xlevel/apps/vanilla/vanilla/doc_events/expense_claim.py”, line 12, in verify_authority
possible_rules = get_applicable_authorization_rules(expense_claim)
File “/home/ubuntu/xlevel/apps/vanilla/vanilla/doc_events/expense_claim.py”, line 43, in get_applicable_authorization_rules
approver = doc.exp_approver
AttributeError: ‘ExpenseClaim’ object has no attribute ‘exp_approver’

Traceback (most recent call last):
File “/home/ubuntu/xlevel/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/ubuntu/xlevel/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/ubuntu/xlevel/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/ubuntu/xlevel/apps/frappe/frappe/init.py”, line 1007, in call
return fn(*args, **newargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 296, in _save
self.run_before_save_methods()
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 877, in run_before_save_methods
self.run_method(“before_save”)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/xlevel/apps/frappe/frappe/model/document.py”, line 1033, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/ubuntu/xlevel/apps/vanilla/vanilla/doc_events/expense_claim.py”, line 12, in verify_authority
possible_rules = get_applicable_authorization_rules(expense_claim)
File “/home/ubuntu/xlevel/apps/vanilla/vanilla/doc_events/expense_claim.py”, line 43, in get_applicable_authorization_rules
approver = doc.exp_approver
AttributeError: ‘ExpenseClaim’ object has no attribute ‘exp_approver’


#6

Same issue here, using last update v11.0.3 no approver showing,


#7

I suggest you raise a bug if you haven’t done so already