Problem with user role copying

63 views
Skip to first unread message

Michael J.

unread,
May 29, 2015, 12:36:23 PM5/29/15
to idem...@googlegroups.com
Hello,

in our iDempiere installation we use a lot of user role customization (Window Access, Process Access etc.) so while we create a new client we need to copy one "template" role for them (instead of customizing it manually each time). Since it is impossible to copy role between different clients using "Copy Role Process" we created SQL script which moves access settings between any two roles (based on org.compiere.process.CopyRole algorithm -> for tables: "AD_Window_Access", "AD_Process_Access", "AD_Form_Access", "AD_Workflow_Access", "AD_Task_Access", "AD_Document_Action_Access", "AD_InfoWindow_Access", "AD_Role_Included"; clear entries for destination role + update ad_client_id and ad_role_id values for source role entries.

Our script works perfectly fine in scope of one client. However when we move access settings to the role belonging to a different client a 99% of expected functionality also works perfectly fine besides one detail: Document Action. When user with new copied role click it (on any document type) a splash screen appears for the short while, then disappears and nothing happens (list of document statuses choice doesn't show up). It looks like the possible statuses list for the Document Action choice was empty so the window doesn't show up? 

Does anybody have an idea what can be the reason of such behavior? The copied role looks exactly the same as its original template. What's more if we move the access settings back to the source role it works correctly too. Any clues will be appreciated :) 

Carlos Antonio Ruiz Gomez

unread,
May 29, 2015, 1:02:45 PM5/29/15
to idem...@googlegroups.com
Michael, I guess you need a conversion table for the document type ID as
it must be different on each client, are you translating it?

Also, to avoid that hassle iDempiere implemented this:
http://wiki.idempiere.org/en/NF1.0_Role_Inheritance
You can consider it and it will simplify a lot all the configuration
you're doing, and can keep it centralized if you define the master roles
in System - it works for document actions too, but in such case you need
to define document types in System for each document base type.

Regards,

Carlos Ruiz
> --

Michael J.

unread,
Jun 1, 2015, 6:38:53 AM6/1/15
to idem...@googlegroups.com
Carlos,

role inheritance works like a charm - it simplified our process a lot. Also document actions work out-of-the-box since all the documents already have base types defined by default. 

Thanks a lot for your support,
Michael
Reply all
Reply to author
Forward
0 new messages