details: https://code.openbravo.com/erp/devel/pi/rev/e5cd53fc8141 changeset: 26168:e5cd53fc8141 user: Jorge Garcia <jorge.garcia <at> openbravo.com> date: Tue Feb 17 12:33:34 2015 +0100 summary: Fixed issue 27953 AccessibleOrgTree wrongly used in some reports
In many manual reports the organization combo is filled using: ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "", "", Utility.getContext(this, vars, "#AccessibleOrgTree", "XXXX"), Utility.getContext(this, vars, "#User_Client", "XXXX"), '*'); “#AccessibleOrgTree” context gets the list of all the granted organizations, their ancestors and their descendants organizations. It's necessary to use “#User_Org” instead, which contains the organizations that are granted by the role: ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "", "", Utility.getContext(this, vars, "#User_Org", "XXXX"), Utility.getContext(this, vars, "#User_Client", "XXXX"), '*'); Reports from these folders had been checked: src/org/openbravo/erpCommon/ad_reports src/org/openbravo/erpReports Files affected by this issue had been changed and tried details: https://code.openbravo.com/erp/devel/pi/rev/9e165ce2e311 changeset: 26169:9e165ce2e311 user: Jorge Garcia <jorge.garcia <at> openbravo.com> date: Tue Mar 03 12:04:20 2015 +0100 summary: Related to issue 27953: Updated Copyright Updated Copyright dates diffstat: modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule.java | 7 ++-- src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java | 5 +-- src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java | 2 +- src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java | 7 ++-- src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java | 8 ++-- src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java | 10 +++--- src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java | 15 ++++----- src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java | 4 +- 14 files changed, 39 insertions(+), 43 deletions(-) diffs (truncated from 327 to 300 lines): diff -r 59a302602f2f -r 9e165ce2e311 modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java --- a/modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java Thu Mar 12 12:00:30 2015 +0100 +++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2009-2012 Openbravo SLU + * All portions are Copyright (C) 2009-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -154,7 +154,7 @@ xmlDocument.setParameter("adOrgId", strCOrgId); try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "49DC1D6F086945AB82F84C66F5F13F16", Utility.getContext(this, vars, "#AccessibleOrgTree", + "49DC1D6F086945AB82F84C66F5F13F16", Utility.getContext(this, vars, "#User_Org", "ReportOrderNotShipped"), Utility.getContext(this, vars, "#User_Client", "ReportOrderNotShipped"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportOrderNotShipped", ""); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -236,7 +236,7 @@ xmlDocument.setParameter("paramAD_ORG_Id", strOrgTrx); try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportAgingBalanceData"), + "", Utility.getContext(this, vars, "#User_Org", "ReportAgingBalanceData"), Utility.getContext(this, vars, "#User_Client", "ReportAgingBalanceData"), '*'); comboTableData.fillParameters(null, "ReportAgingBalanceData", strOrgTrx); xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false)); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -243,7 +243,7 @@ try { // AD_OrgType_BU_LE ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "", - "AD_OrgType_BU_LE", Utility.getContext(this, vars, "#AccessibleOrgTree", + "AD_OrgType_BU_LE", Utility.getContext(this, vars, "#User_Org", "ReportAnnualCertification"), Utility.getContext(this, vars, "#User_Client", "ReportAnnualCertification"), '*'); comboTableData.fillParameters(null, "ReportAnnualCertification", ""); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2009-2010 Openbravo SLU + * All portions are Copyright (C) 2009-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -185,9 +185,8 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", - "ReportAssetDepreciationSchedule"), Utility.getContext(this, vars, "#User_Client", - "ReportAssetDepreciationSchedule"), '*'); + "", Utility.getContext(this, vars, "#User_Org", "ReportAssetDepreciationSchedule"), + Utility.getContext(this, vars, "#User_Client", "ReportAssetDepreciationSchedule"), '*'); comboTableData.fillParameters(null, "ReportAssetDepreciationSchedule", ""); xmlDocument.setData("reportAD_ORG_ID", "liststructure", comboTableData.select(false)); } catch (Exception ex) { diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2014 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -255,7 +255,7 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportBudgetGenerateExcel"), + "", Utility.getContext(this, vars, "#User_Org", "ReportBudgetGenerateExcel"), Utility.getContext(this, vars, "#User_Client", "ReportBudgetGenerateExcel"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportBudgetGenerateExcel", ""); xmlDocument.setData("reportTrxOrg", "liststructure", comboTableData.select(false)); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -126,8 +126,7 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "AD_OrgType_BU_LE", - Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportCashFlow"), + "AD_OrgType_BU_LE", Utility.getContext(this, vars, "#User_Org", "ReportCashFlow"), Utility.getContext(this, vars, "#User_Client", "ReportCashFlow"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportCashFlow", ""); xmlDocument.setData("reportAD_ORG", "liststructure", comboTableData.select(false)); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java Tue Mar 03 12:04:20 2015 +0100 @@ -433,7 +433,7 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", + "", Utility.getContext(this, vars, "#User_Org", "ReportInvoiceCustomerDimensionalAnalysesJR"), Utility.getContext(this, vars, "#User_Client", "ReportInvoiceCustomerDimensionalAnalysesJR"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2011 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -282,9 +282,8 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", - "ReportMaterialDimensionalAnalyzeJR"), Utility.getContext(this, vars, "#User_Client", - "ReportMaterialDimensionalAnalyzeJR"), 0); + "", Utility.getContext(this, vars, "#User_Org", "ReportMaterialDimensionalAnalyzeJR"), + Utility.getContext(this, vars, "#User_Client", "ReportMaterialDimensionalAnalyzeJR"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportMaterialDimensionalAnalyzeJR", strOrg); xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false)); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -164,7 +164,7 @@ } try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportOrderNotInvoiceJR"), + "", Utility.getContext(this, vars, "#User_Org", "ReportOrderNotInvoiceJR"), Utility.getContext(this, vars, "#User_Client", "ReportOrderNotInvoiceJR"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportOrderNotInvoiceJR", strCOrgId); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2012 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -225,9 +225,9 @@ try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "D4DF252DEC3B44858454EE5292A8B836", Utility.getContext(this, vars, - "#AccessibleOrgTree", "ReportParetoProduct"), Utility.getContext(this, vars, - "#User_Client", "ReportParetoProduct"), 0); + "D4DF252DEC3B44858454EE5292A8B836", Utility.getContext(this, vars, "#User_Org", + "ReportParetoProduct"), Utility.getContext(this, vars, "#User_Client", + "ReportParetoProduct"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportParetoProduct", strAD_Org_ID); xmlDocument.setData("reportAD_Org_ID", "liststructure", comboTableData.select(false)); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2014 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -361,7 +361,7 @@ comboTableData = null; comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", "", - Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportProjectProfitabilityJR"), + Utility.getContext(this, vars, "#User_Org", "ReportProjectProfitabilityJR"), Utility.getContext(this, vars, "#User_Client", "ReportProjectProfitabilityJR"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportProjectProfitabilityJR", strOrg); diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -266,9 +266,8 @@ } try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", - "ReportRefundSalesDimensionalAnalyses"), Utility.getContext(this, vars, - "#User_Client", "ReportRefundSalesDimensionalAnalyses"), 0); + "", Utility.getContext(this, vars, "#User_Org", "ReportRefundSalesDimensionalAnalyses"), + Utility.getContext(this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportRefundSalesDimensionalAnalyses", strOrg); xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false)); @@ -424,7 +423,8 @@ intDiscard++; } else if (strShownArray[i].equals("4")) { strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('" - + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END"; + + vars.getLanguage() + + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END"; intAuxDiscard = i; intDiscard++; } else if (strShownArray[i].equals("5")) { diff -r 59a302602f2f -r 9e165ce2e311 src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java Thu Mar 12 12:00:30 2015 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java Tue Mar 03 12:04:20 2015 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2012 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -334,9 +334,8 @@ } try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#AccessibleOrgTree", - "ReportShipmentDimensionalAnalyzeJR"), Utility.getContext(this, vars, "#User_Client", - "ReportShipmentDimensionalAnalyzeJR"), 0); + "", Utility.getContext(this, vars, "#User_Org", "ReportShipmentDimensionalAnalyzeJR"), + Utility.getContext(this, vars, "#User_Client", "ReportShipmentDimensionalAnalyzeJR"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportShipmentDimensionalAnalyzeJR", strOrg); xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false)); @@ -594,10 +593,10 @@ strHaving = " HAVING (SUM(CONVAMOUNT) > " + strMayor + ")"; } else if (strMayor.equals("") && !strMenor.equals("")) { strHaving = " HAVING (SUM(CONVAMOUNT) < " + strMenor + ")"; - } - /*else { - strHaving = " HAVING (SUM(CONVAMOUNT) <> 0 OR SUM(CONVAMOUNTREF) <> 0)"; - }*/ + } ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits