Role manager, voucher types

hello,

i want to set different role permissions for different voucher types, like i want the following permissions for my assistant:

journal voucher-(bank voucher)
only create/write, should not be able to submit

journal voucher-(all others)
create/write/submit.(full control)

it it possible in any easy to understand way?

thank you



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/ae875822-11aa-42ab-bcd0-f352e5a16b13%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Asad,

Instead of setting properties on specific type of voucher, giving permission to the user through "Role permission manager" should solve your purpose. 
(Setup > users & permission > Role permission manager)

----
Sunil
Partner for ERPNext

On Wednesday, August 6, 2014 3:25:59 AM UTC+5:30, Asad Hassan Larik wrote:
hello,

i want to set different role permissions for different voucher types, like i want the following permissions for my assistant:

journal voucher-(bank voucher)
only create/write, should not be able to submit

journal voucher-(all others)
create/write/submit.(full control)

it it possible in any easy to understand way?

thank you



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/2b31fc8c-ec44-43c0-af85-493b58e2bd57%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I am using role permissions manager, but the role permission user doest not allow setting different settings for different types of journal vouchers separately.

On Wednesday, August 6, 2014 9:21:43 AM UTC+5, Sunil Kumar wrote:
Hi Asad,

Instead of setting properties on specific type of voucher, giving permission to the user through "Role permission manager" should solve your purpose. 
(Setup > users & permission > Role permission manager)

----
Sunil
Partner for ERPNext

On Wednesday, August 6, 2014 3:25:59 AM UTC+5:30, Asad Hassan Larik wrote:
hello,

i want to set different role permissions for different voucher types, like i want the following permissions for my assistant:

journal voucher-(bank voucher)
only create/write, should not be able to submit

journal voucher-(all others)
create/write/submit.(full control)

it it possible in any easy to understand way?

thank you



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/d8217c34-4af5-4a36-b215-f5cb6d858b9e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I am using role permissions manager, but the role permission user doest not allow setting different settings for different types of journal vouchers separately.

On Wednesday, August 6, 2014 9:21:43 AM UTC+5, Sunil Kumar wrote:
Hi Asad,

Instead of setting properties on specific type of voucher, giving permission to the user through "Role permission manager" should solve your purpose. 
(Setup > users & permission > Role permission manager)

----
Sunil
Partner for ERPNext




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/75e26b7e-2b27-40ed-9dba-ac25d251a2bc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Asad, That is not possible right unless you write a custom script.


On 06-Aug-2014, at 5:59 pm, Asad Hassan Larik <as...@gmail.com> wrote:

I am using role permissions manager, but the role permission user doest not allow setting different settings for different types of journal vouchers separately.

On Wednesday, August 6, 2014 9:21:43 AM UTC+5, Sunil Kumar wrote:
Hi Asad,

Instead of setting properties on specific type of voucher, giving permission to the user through "Role permission manager" should solve your purpose. 
(Setup > users & permission > Role permission manager)

----
Sunil
Partner for ERPNext





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/75e26b7e-2b27-40ed-9dba-ac25d251a2bc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/9D962436-CD17-4758-8C8E-47074986F7DD%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Hello,

I have the same requirement. For me only Accounts Manager and Administrator should be able to save any type of Journal Voucher. The other roles can only save Credit or Debit notes.

I tried to solve the issue with this custom script:

cur_frm.cscript.custom_validate = function(doc) {
    if (user_roles.indexOf("Accounts Manager")==-1 || user_roles.indexOf("Administrator")==-1) {
        if (doc.voucher_type != "Debit Note" || doc.voucher.type != "Credit Note") {
            msgprint("You can only select Debit Note or Credit Note");
            validated = false;
        }
    }
}

But this is not working. No problem with an account having the Adminsitrator or Accounts Manager roles, but with other roles I get the warning message even if I chose Debit or Credit Note.

Can someone help me with this?

Thanks,

Check your logic, the inner if should have an && condition?

Thanks for your reply. It’s working perfectly!

Here is the final code if anyone needs it:

cur_frm.cscript.custom_validate = function(doc) {
if (user_roles.indexOf(“Accounts Manager”)==-1 || user_roles.indexOf(“Administrator”)==-1) {
if (doc.voucher_type != “Debit Note” && doc.voucher_type != “Credit Note”) {
msgprint(“You can only select Debit Note or Credit Note”);
validated = false;
}
}
}