Error on Leave Application

27 views
Skip to first unread message

Nguyen Do Le Bao

unread,
Sep 18, 2014, 11:01:30 PM9/18/14
to erpnext-dev...@googlegroups.com
Hi guys, 

I encountered the following error but don't know how to resolve it:
Given:
- Got 2 User, User A and User B
- B is Leave Approver of A 
Steps to repro:
- Log in as User A
- Add New Leave Application, Select B as Leave Approver 
- The moment I change field to_date or press Save.  Error occurs: Not allowed to access User with Leave Approver = us...@gmail.com
The error seems to come from this line in leave_application.js:

return get_server_fields('get_total_leave_days', '', '', doc, dt, dn, 1);

Is there sth to do with User Permission ? 
How do I check for this cos actually in local version, it works fine but not in production. So I suspect could be something to do with data as well.

Thanks!!!

Rushabh Mehta

unread,
Sep 19, 2014, 12:57:41 AM9/19/14
to erpnext-dev...@googlegroups.com
Can you raise a GitHub Issue for this?

If you want to solve it,

Create a new whitelisted method for "get_total_leave_days"

and change "get_server_fields" to 

frappe.call({ ... 

best,
Rushabh

--
Note:
 
If you are posting an issue,
 
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/948dfda2-48f8-4691-a09e-bd2bd88643db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages