Restricting From and To Warehouses in Stock Entry

42 views
Skip to first unread message

lxnow

unread,
Dec 24, 2012, 8:17:28 PM12/24/12
to erpnext-dev...@googlegroups.com
Hi everyone,

I have multiple locations that we need to track inventory for and multiple users that have access to these locations. We are using Stock Entry (STE) forms to move stock in and out of these locations.  However, we need to have these locations restricted to each users to avoid encoding mistakes.  For example, we do not want the warehouse supervisor to mistakenly deduct or add stocks to the production location as this would render inventory data inaccurate and lead to more time spent on auditing.

The restriction rules need to be on a per user basis (rather than role) as we would have, for example, two warehouse supervisors who are in charge of different physical warehouses. The restriction rules must also be definable to both source (stock deductions) and target (stock additions).

After a few email exchanges with the erpnext support teamRushabh suggested to post my problem here along with his original intended solution via custom script.  While I am not a developer myself, I tried hacking the script to our need but have hit a wall: because we have more than 40 locations and more than 10 users at the moment (with the expectation to expand as we we go forward) the script doesn't work after 5 users and Rushabh tells me that this approach will render erpnext to run very slowly.  I have attached a sample of our script.  

I was hoping someone would be gracious enough to take a look into my script and offer some advice, or if someone else has already encountered and resolved a similar problem.

Thanks!
SAMPLE SCRIPT erpnext Location Restrctions.js

an...@iwebnotes.com

unread,
Dec 25, 2012, 2:21:43 AM12/25/12
to erpnext-dev...@googlegroups.com
Hi Laurence,

We could simplify this requirement by adding a table called "Warehouse User" in the warehouse form. Once populated, it will check when submitting a stock entry, if the user is allowed to make any entry against that warehouse, be it entered in source warehouse or target warehouse. However, if the user is not mentioned in the Warehouse User table, he will not be stopped from making a stock entry for that warehouse (if he has write permission on Stock Entry).

This should solve your issue. We will try to do this soon.

Thanks,
Anand.
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/qIwF1FcC3o4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Laurence Cua

unread,
Dec 25, 2012, 3:17:17 AM12/25/12
to erpnext-dev...@googlegroups.com

Hi Anand. That sounds great. Looking forward to this implementation. Will help us with roll out

lxnow

unread,
Jan 16, 2013, 10:35:02 PM1/16/13
to erpnext-dev...@googlegroups.com
Hi Anand,

I just wanted to check in with you guys how things are going on this? I'd be more than happy to test out the functionality if that would help.

Thanks.


On Tuesday, December 25, 2012 4:17:17 PM UTC+8, lxnow wrote:

Hi Anand. That sounds great. Looking forward to this implementation. Will help us with roll out

On Dec 25, 2012 3:23 PM, "an...@erpnext.com" <an...@iwebnotes.com> wrote:
Hi Laurence,

We could simplify this requirement by adding a table called "Warehouse User" in the warehouse form. Once populated, it will check when submitting a stock entry, if the user is allowed to make any entry against that warehouse, be it entered in source warehouse or target warehouse. However, if the user is not mentioned in the Warehouse User table, he will not be stopped from making a stock entry for that warehouse (if he has write permission on Stock Entry).

This should solve your issue. We will try to do this soon.

Thanks,
Anand.

On Tue, Dec 25, 2012 at 6:47 AM, lxnow <laur...@union.ph> wrote:
Hi everyone,

I have multiple locations that we need to track inventory for and multiple users that have access to these locations. We are using Stock Entry (STE) forms to move stock in and out of these locations.  However, we need to have these locations restricted to each users to avoid encoding mistakes.  For example, we do not want the warehouse supervisor to mistakenly deduct or add stocks to the production location as this would render inventory data inaccurate and lead to more time spent on auditing.

The restriction rules need to be on a per user basis (rather than role) as we would have, for example, two warehouse supervisors who are in charge of different physical warehouses. The restriction rules must also be definable to both source (stock deductions) and target (stock additions).

After a few email exchanges with the erpnext support teamRushabh suggested to post my problem here along with his original intended solution via custom script.  While I am not a developer myself, I tried hacking the script to our need but have hit a wall: because we have more than 40 locations and more than 10 users at the moment (with the expectation to expand as we we go forward) the script doesn't work after 5 users and Rushabh tells me that this approach will render erpnext to run very slowly.  I have attached a sample of our script.  

I was hoping someone would be gracious enough to take a look into my script and offer some advice, or if someone else has already encountered and resolved a similar problem.

Thanks!

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-developer-forum@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer-forum+unsub...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/qIwF1FcC3o4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-developer-forum@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer-forum+unsub...@googlegroups.com.

Anand Doshi

unread,
Jan 17, 2013, 12:34:49 AM1/17/13
to erpnext-dev...@googlegroups.com
Dear Laurence,

Thanks for your offer :). It will help us to polish the feature.

We should be able to release this by next week.

Thanks,
Anand.

To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/3enibDIG82cJ.

Laurence Cua

unread,
Jan 30, 2013, 8:09:50 PM1/30/13
to erpnext-dev...@googlegroups.com
Hi Anand, any news on this feature? (and coming from Rushabh's email announcement, will this be part of the features for the more daring "beta" customers?)

Thanks.
Laurence

Laurence Cua
Think Big with Union
Rediscover your music with Promac
a-JAYS One+: Also in White


Anand Doshi

unread,
Jan 30, 2013, 9:47:29 PM1/30/13
to erpnext-dev...@googlegroups.com
Dear Laurence,

Sorry for not keeping our commitment. 

Due to the internationalisation release and the recent performance issues, we have had our hands full. Also, I have been on leave and as such, we are also a developer short. 

We sincerely want to get this done. This is a good problem to solve. We will  discuss about this and inform you on how soon can this be done.

Thanks,
Anand. 

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

To post to this group, send email to erpnext-dev...@googlegroups.com.

Rushabh Mehta

unread,
Jan 31, 2013, 11:09:29 AM1/31/13
to erpnext-dev...@googlegroups.com
Laurence - will complete it next week. Sorry for the delay.
--



Twitter: @rushabh_mehta

Laurence Cua

unread,
Jan 31, 2013, 6:12:21 PM1/31/13
to erpnext-dev...@googlegroups.com

Thanks again rushabh

Reply all
Reply to author
Forward
0 new messages