details: https://code.openbravo.com/erp/devel/pi/rev/1936b3a14f82 changeset: 14293:1936b3a14f82 user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Mon Nov 21 12:21:53 2011 +0100 summary: Fixed issue 19118. If the current role has a defined menu tree, it will be used to build the main application tree.
details: https://code.openbravo.com/erp/devel/pi/rev/981f72e0f464 changeset: 14294:981f72e0f464 user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Mon Nov 21 12:32:20 2011 +0100 summary: Fixed issue 19118. Window will be usable in System Admin role details: https://code.openbravo.com/erp/devel/pi/rev/39644a138055 changeset: 14295:39644a138055 user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Mon Nov 21 12:37:04 2011 +0100 summary: Fixed issue 19120. Sales Invoice complete will no longer fail if the role doesn't have access to the Document Type window. diffstat: modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java | 8 +++++++- modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java | 10 ++++++++-- src-db/database/sourcedata/AD_TABLE.xml | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diffs (57 lines): diff -r f3990c558b4f -r 39644a138055 modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java Sat Nov 19 02:56:20 2011 +0100 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java Mon Nov 21 12:37:04 2011 +0100 @@ -180,7 +180,13 @@ if ("CO".equals(strdocaction)) { // Need to refresh the invoice again from the db invoice = dao.getObject(Invoice.class, strC_Invoice_ID); - final String invoiceDocCategory = invoice.getDocumentType().getDocumentCategory(); + OBContext.setAdminMode(false); + String invoiceDocCategory = ""; + try { + invoiceDocCategory = invoice.getDocumentType().getDocumentCategory(); + } finally { + OBContext.restorePreviousMode(); + } /* * Print a grid popup in case of credit payment */ diff -r f3990c558b4f -r 39644a138055 modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java --- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java Sat Nov 19 02:56:20 2011 +0100 +++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java Mon Nov 21 12:37:04 2011 +0100 @@ -39,6 +39,7 @@ import org.openbravo.erpCommon.obps.ActivationKey; import org.openbravo.erpCommon.obps.ActivationKey.FeatureRestriction; import org.openbravo.erpCommon.utility.Utility; +import org.openbravo.model.ad.access.Role; import org.openbravo.model.ad.domain.ModelImplementationMapping; import org.openbravo.model.ad.ui.Form; import org.openbravo.model.ad.ui.Menu; @@ -339,8 +340,13 @@ } private void createInitialMenuList() { - - final Tree tree = OBDal.getInstance().createQuery(Tree.class, "typeArea='MM'").list().get(0); + Role role = OBDal.getInstance().get(Role.class, roleId); + final Tree tree; + if (role.getPrimaryTreeMenu() != null) { + tree = role.getPrimaryTreeMenu(); + } else { + tree = OBDal.getInstance().createQuery(Tree.class, "id='10'").list().get(0); + } menuOptions = new ArrayList<MenuOption>(); OBCriteria<TreeNode> treeNodes = OBDal.getInstance().createCriteria(TreeNode.class); treeNodes.add(Restrictions.eq(TreeNode.PROPERTY_TREE, tree)); diff -r f3990c558b4f -r 39644a138055 src-db/database/sourcedata/AD_TABLE.xml --- a/src-db/database/sourcedata/AD_TABLE.xml Sat Nov 19 02:56:20 2011 +0100 +++ b/src-db/database/sourcedata/AD_TABLE.xml Mon Nov 21 12:37:04 2011 +0100 @@ -7697,7 +7697,7 @@ <!--1000500000--> <TABLENAME><![CDATA[C_POC_CONFIGURATION]]></TABLENAME> <!--1000500000--> <CLASSNAME><![CDATA[EmailServerConfiguration]]></CLASSNAME> <!--1000500000--> <ISVIEW><![CDATA[N]]></ISVIEW> -<!--1000500000--> <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL> +<!--1000500000--> <ACCESSLEVEL><![CDATA[6]]></ACCESSLEVEL> <!--1000500000--> <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED> <!--1000500000--> <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE> <!--1000500000--> <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME> ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
