What's the way to check validations for STOP action on a document? E.g. I want to give user access to write a document but *not* STOP it (sales order, purchase order)? Thanks.
–
Note:
If you are posting an issue,
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.
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.
I think a client side custom script could be used to prevent users from stopping. At least as an immediate solution.
var original_stop_function = cur_frm.cscript['Stop Sales Order’];
cur_frm.cscript['Stop Sales Order’] = function() {
// Your custom code
// if allowed, call original_stop_function
};
Though, ideally, erpnext should check if the user has write permission on Status field and allow/block the user based on that. Another area we can improve upon!
Hope this helps.
Best,
Anand Doshi.
On 8 February 2014 at 12:27:20 pm, lxnow (la…@union.ph) wrote:
What’s the way to check validations for STOP action on a document?
E.g.
I want to give user access to write a document but not STOP it
(sales
order, purchase order)? Thanks.
–
Note:
If you are posting an issue,
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.
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.
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.
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.
msgprint("You are not allowed to stop this sales order");
validated = false;
}
}
On Saturday, February 8, 2014 4:27:49 PM UTC+8, Anand Doshi wrote:
Hi Laurence,
I think a client side custom script could be used to prevent users from stopping. At least as an immediate solution.
var original_stop_function = cur_frm.cscript['Stop Sales Order’];
cur_frm.cscript['Stop Sales Order’] = function() {
// Your custom code
// if allowed, call original_stop_function
};
Though, ideally, erpnext should check if the user has write permission on Status field and allow/block the user based on that. Another area we can improve upon!
Hope this helps.
Best,
Anand Doshi.
On 8 February 2014 at 12:27:20 pm, lxnow (la...@union.ph) wrote:
>
> What's the way to check validations for STOP action on a document?
> E.g.
> I want to give user access to write a document but *not* STOP it
> (sales
> order, purchase order)? Thanks.
>
> --
> Note:
>
> If you are posting an issue,
> 1. 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.
> 2. Paste your code at http://pastebin.com or http://gist.github.com > and send only the URL via email
> 3. 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-forum+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/feed4d9f-faea-44ee-a8fa-b7716a4a0985%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
–
Note:
If you are posting an issue,
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.
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.
On 8 February 2014 at 3:05:45 pm, lxnow (la…@union.ph) wrote:
Thanks Anand. Can you see why the following doesn’t work? Where
do I use
the variable original_stop_function?
var original_stop_function = cur_frm.cscript['Stop Sales
Order’];
cur_frm.cscript['Stop Sales Order’] = function() {
if(user=="us...@domain.com"){
msgprint(“You are not allowed to stop this sales order”);
validated = false;
}
}
On Saturday, February 8, 2014 4:27:49 PM UTC+8, Anand Doshi wrote:
Hi Laurence,
I think a client side custom script could be used to prevent users
from
stopping. At least as an immediate solution.
var original_stop_function = cur_frm.cscript['Stop Sales
Order’];
cur_frm.cscript['Stop Sales Order’] = function() {
// Your custom code
// if allowed, call original_stop_function
};
Though, ideally, erpnext should check if the user has write
permission on
Status field and allow/block the user based on that. Another
area we can
improve upon!
Hope this helps.
Best,
Anand Doshi.
On 8 February 2014 at 12:27:20 pm, lxnow (la…@union.ph
)
wrote:
What’s the way to check validations for STOP action on a document?
E.g.
I want to give user access to write a document but not STOP
it
(sales
order, purchase order)? Thanks.
–
Note:
If you are posting an issue,
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.
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.
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.
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.
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.
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.
On 8 February 2014 at 3:05:45 pm, lxnow (la...@union.ph) wrote:
>
> Thanks Anand. Can you see why the following doesn't work? Where
> do I use
> the variable original_stop_function?
>
> var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> cur_frm.cscript['Stop Sales Order’] = function() {
> if(user=="us...@domain.com"){
> msgprint("You are not allowed to stop this sales order");
> validated = false;
> }
> }
>
>
> On Saturday, February 8, 2014 4:27:49 PM UTC+8, Anand Doshi wrote:
> >
> > Hi Laurence,
> >
> > I think a client side custom script could be used to prevent users
> from
> > stopping. At least as an immediate solution.
> >
> > var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> > cur_frm.cscript['Stop Sales Order’] = function() {
> > // Your custom code
> >
> > // if allowed, call original_stop_function
> > };
> >
> > Though, ideally, erpnext should check if the user has write
> permission on
> > Status field and allow/block the user based on that. Another
> area we can
> > improve upon!
> >
> > Hope this helps.
> >
> > Best,
> > Anand Doshi.
> >
> > On 8 February 2014 at 12:27:20 pm, lxnow (la...@union.ph > )
> > wrote:
> > >
> > > What's the way to check validations for STOP action on a document?
> > > E.g.
> > > I want to give user access to write a document but *not* STOP
> it
> > > (sales
> > > order, purchase order)? Thanks.
> > >
> > > --
> > > Note:
> > >
> > > If you are posting an issue,
> > > 1. 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.
> > > 2. Paste your code at http://pastebin.com or http://gist.github.com > > > and send only the URL via email
> > > 3. 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-forum+un...@googlegroups.com > .
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/erpnext-developer-forum/feed4d9f-faea-44ee-a8fa-b7716a4a0985%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> >
> >
>
> --
> Note:
>
> If you are posting an issue,
> 1. 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.
> 2. Paste your code at http://pastebin.com or http://gist.github.com > and send only the URL via email
> 3. 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-forum+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b6bfbbde-2a8e-49b0-b7b3-eb9d2a235d94%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
–
Note:
If you are posting an issue,
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.
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.
Hi, to those who have had the opportunity to try 4.0, is STOP now part of permissions? My attempt (with Anand's help) on a script didn't work out... so instead of trying the script approach again, I was wondering if STOP is something that can controlled using the v4 permission engine. Thanks!
On Saturday, February 8, 2014 6:40:25 PM UTC+8, lxnow wrote:
Thanks. I think I understand the logic the script, but unfortunately it doesn't work. The sales order form won't load properly (just shows a blank).
On Saturday, February 8, 2014 6:06:35 PM UTC+8, Anand Doshi wrote:
On 8 February 2014 at 3:05:45 pm, lxnow (la...@union.ph) wrote:
>
> Thanks Anand. Can you see why the following doesn't work? Where
> do I use
> the variable original_stop_function?
>
> var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> cur_frm.cscript['Stop Sales Order’] = function() {
> if(user=="us...@domain.com"){
> msgprint("You are not allowed to stop this sales order");
> validated = false;
> }
> }
>
>
> On Saturday, February 8, 2014 4:27:49 PM UTC+8, Anand Doshi wrote:
> >
> > Hi Laurence,
> >
> > I think a client side custom script could be used to prevent users
> from
> > stopping. At least as an immediate solution.
> >
> > var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> > cur_frm.cscript['Stop Sales Order’] = function() {
> > // Your custom code
> >
> > // if allowed, call original_stop_function
> > };
> >
> > Though, ideally, erpnext should check if the user has write
> permission on
> > Status field and allow/block the user based on that. Another
> area we can
> > improve upon!
> >
> > Hope this helps.
> >
> > Best,
> > Anand Doshi.
> >
> > On 8 February 2014 at 12:27:20 pm, lxnow (la...@union.ph > )
> > wrote:
> > >
> > > What's the way to check validations for STOP action on a document?
> > > E.g.
> > > I want to give user access to write a document but *not* STOP
> it
> > > (sales
> > > order, purchase order)? Thanks.
> > >
> > > --
> > > Note:
> > >
> > > If you are posting an issue,
> > > 1. 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.
> > > 2. Paste your code at http://pastebin.com or http://gist.github.com > > > and send only the URL via email
> > > 3. 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-forum+un...@googlegroups.com > .
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/erpnext-developer-forum/feed4d9f-faea-44ee-a8fa-b7716a4a0985%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> >
> >
>
> --
> Note:
>
> If you are posting an issue,
> 1. 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.
> 2. Paste your code at http://pastebin.com or http://gist.github.com > and send only the URL via email
> 3. 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-forum+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b6bfbbde-2a8e-49b0-b7b3-eb9d2a235d94%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
–
Note:
If you are posting an issue,
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.
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.
STOP is not part of the permission system. We discussed about this and it doesn’t seem to fit into permission system.
Come to think about it, it seems to be the perfect use case for implementing a workflow. See: http://erpnext.org/workflows
We might have to tweak some code though.
Best,
Anand Doshi.
On 27 February 2014 at 3:48:01 pm, lxnow (la...@union.ph) wrote:
Hi, to those who have had the opportunity to try
4.0, is STOP now part of permissions? My attempt (with Anand's
help) on a script didn't work out... so instead of trying the
script approach again, I was wondering if STOP is something that
can controlled using the v4 permission engine. Thanks!
On Saturday, February 8, 2014 6:40:25 PM UTC+8, lxnow wrote:
Thanks. I think I understand the logic the script,
but unfortunately it doesn't work. The sales order form won't load
properly (just shows a blank).
On Saturday, February 8, 2014 6:06:35 PM UTC+8, Anand Doshi wrote:
On 8 February 2014 at 3:05:45 pm, lxnow (la...@union.ph)
wrote:
>
> Thanks Anand. Can you see why the following doesn't work?
Where
> do I use
> the variable original_stop_function?
>
> var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> cur_frm.cscript['Stop Sales Order’] = function() {
> if(user=="us...@domain.com"){
> msgprint("You are not allowed to stop this sales
order");
> validated = false;
> }
> }
>
>
> On Saturday, February 8, 2014 4:27:49 PM UTC+8, Anand Doshi
wrote:
> >
> > Hi Laurence,
> >
> > I think a client side custom script could be used to
prevent users
> from
> > stopping. At least as an immediate solution.
> >
> > var original_stop_function = cur_frm.cscript['Stop Sales
> Order’];
> > cur_frm.cscript['Stop Sales Order’] = function() {
> > // Your custom code
> >
> > // if allowed, call original_stop_function
> > };
> >
> > Though, ideally, erpnext should check if the user has
write
> permission on
> > Status field and allow/block the user based on that.
Another
> area we can
> > improve upon!
> >
> > Hope this helps.
> >
> > Best,
> > Anand Doshi.
> >
> > On 8 February 2014 at 12:27:20 pm, lxnow
(la...@union.ph
> )
> > wrote:
> > >
> > > What's the way to check validations for STOP action
on a document?
> > > E.g.
> > > I want to give user access to write a document but
*not* STOP
> it
> > > (sales
> > > order, purchase order)? Thanks.
> > >
> > > --
> > > Note:
> > >
> > > If you are posting an issue,
> > > 1. 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.
> > > 2. Paste your code at
http://pastebin.com or
http://gist.github.com
> > > and send only the URL via email
> > > 3. 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-forum+un...@googlegroups.com
> .
> > > To view this discussion on the web visit
> >
https://groups.google.com/d/msgid/erpnext-developer-forum/feed4d9f-faea-44ee-a8fa-b7716a4a0985%40googlegroups.com.
> >
> > > For more options, visit
https://groups.google.com/groups/opt_out.
> > >
> >
> >
>
> --
> Note:
>
> If you are posting an issue,
> 1. 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.
> 2. Paste your code at
http://pastebin.com or
http://gist.github.com
> and send only the URL via email
> 3. 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-forum+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/b6bfbbde-2a8e-49b0-b7b3-eb9d2a235d94%40googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
--
Note:
If you are posting an issue,
1. 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.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only
the URL via email
3. 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.
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.
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.