[OpenbravoERP-commits] devel/pi: Fixes Issue 12758: Exception executing 'MA_PRODUCTIONR...
details: /erp/devel/pi/rev/cb7049cc0543 changeset: 7173:cb7049cc0543 user: Harikrishnan Raja openbravo.com> date: Sat May 01 12:15:26 2010 +0530 summary: Fixes Issue 12758: Exception executing 'MA_PRODUCTIONRUN_STANDARD\" when working with negative stocks. diffstat: src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml | 57 ++- 1 files changed, 55 insertions(+), 2 deletions(-) diffs (81 lines): diff -r 043c51805371 -r cb7049cc0543 src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml --- a/src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml Fri Apr 30 18:01:31 2010 +0200 +++ b/src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml Sat May 01 12:15:26 2010 +0530 @@ -55,6 +55,7 @@ v_PlanLine NUMBER; v_CostCenterCost NUMBER; v_CostCenterUse NUMBER; +v_allownegativestock CHAR(1); v_Calculated CHAR(1); v_ByDefault CHAR(1); -- Toolset Types to process @@ -117,6 +118,11 @@ DBMS_OUTPUT.PUT_LINE('--<>') ; END IF; BEGIN --BODY + SELECT ad_clientinfo.allownegativestock into + v_allownegativestock + FROM ad_clientinfo + where ad_clientinfo.ad_client_id = v_Client_ID; + v_ResultStr:='Getting DoneQuantity and process_ID'; SELECT M_ProductionPlan.AD_Org_ID, M_ProductionPlan.MA_WRPhase_ID, M_ProductionPlan.ProductionQty, M_ProductionPlan.Processed, @@ -336,8 +342,55 @@ END LOOP; END IF; --NEXT_PRODUCT IF (v_QtyAcumulated < v_DoneQuantity*Cur_WRPUsed.MovementQty) THEN - v_Message := '@NotEnoughStocked@: ' || Cur_WRPUsed.pname; -RAISE_APPLICATION_ERROR(-2, v_Message); + IF(v_allownegativestock = 'Y') THEN +IF(v_GlobalUse='Y') THEN +SELECT count(*) + INTO v_Count + FROM MA_GlobalUse + WHERE M_Production_ID=Cur_WRPUsed.M_Production_ID + AND M_Product_ID=Cur_WRPUsed.M_Product_ID; +IF(v_Count=0) THEN + INSERT + INTO MA_GlobalUse + ( + MA_GlobalUse_ID, M_Production_ID, AD_Client_ID, AD_Org_ID, + IsActive, Created, CreatedBy, Updated, + UpdatedBy, M_Product_ID, C_UOM_ID, MovementQty, + M_Locator_ID + ) + VALUES + ( + GET_UUID(), Cur_WRPUsed.M_Production_ID, Cur_WRPUsed.Client_ID, Cur_WRPUsed.Org_ID, + 'Y', now(), v_User_ID, now(), + v_User_ID, Cur_WRPUsed.M_Product_ID, Cur_WRPUsed.C_UOM_ID, 0, + Cur_WRPUsed.M_Locator_ID + ) + ; +END IF; +ELSE +v_Line := v_Line + 10; + INSERT + INTO M_ProductionLine + ( + M_ProductionLine_ID, M_ProductionPlan_ID, Line, AD_Client_ID, + AD_Org_ID, IsActive, Created, CreatedBy, + Updated, UpdatedBy, M_Product_ID, MovementQty, + ProductionType, C_UOM_ID, M_Locator_ID, M_Product_UOM_ID, QuantityOrder + ) + VALUES + ( + GET_UUID(), v_Record_ID, v_Line, Cur_WRPUsed.Client_ID, + Cur_WRPUsed.Org_ID, 'Y', now(), v_User_ID, + now(), v_User_ID, Cur_WRPUsed.M_Product_ID,( CASE v_NoQty WHEN 'Y' THEN 0 ELSE v_DoneQuantity*Cur_WRPUsed.MovementQty - v_QtyAcumulated END), + '-', Cur_WRPUsed.C_UOM_ID, Cur_WRPUsed.M_Locator_ID, Cur_WRPUsed.M_Product_UOM_ID, Cur_WRPUsed.QuantityOrder + ) + ; + END IF; + + ELSE + v_Message := '@NotEnoughStocked@: ' || Cur_WRPUsed.pname; + RAISE_APPLICATION_ERROR(-2, v_Message); + END IF; END IF; ELSE IF Cur_WRPUsed.M_Locator_ID IS NULL THEN --
[OpenbravoERP-commits] devel/int: Fixes issue 0008530: RFE: 2.50 Popup of copy lines fo...
details: /erp/devel/int/rev/043c51805371 changeset: 7172:043c51805371 user: Adrián Romero openbravo.com> date: Fri Apr 30 18:01:31 2010 +0200 summary: Fixes issue 0008530: RFE: 2.50 Popup of copy lines for Goods Receipt should suggest the Attribute values diffstat: src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java | 26 + src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql | 29 -- 2 files changed, 2 insertions(+), 53 deletions(-) diffs (81 lines): diff -r be233422f299 -r 043c51805371 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Fri Apr 30 16:45:11 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Fri Apr 30 18:01:31 2010 +0200 @@ -604,36 +604,14 @@ "org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO").createXmlDocument(); if (strInvoice.equals("")) { if (vars.getLanguage().equals("en_US")) { - if (isSOTrx.equals("Y")) + if (isSOTrx.equals("Y")) { data = CreateFromShipmentData.selectFromPOSOTrx(this, vars.getLanguage(), Utility .getContext(this, vars, "#User_Client", strWindowId), Utility.getContext(this, vars, "#User_Org", strWindowId), strPO); - else { + } else { data = CreateFromShipmentData.selectFromPO(this, vars.getLanguage(), Utility .getContext(this, vars, "#User_Client", strWindowId), Utility.getContext(this, vars, "#User_Org", strWindowId), strPO); -Connection conn = null; -try { - for (int i = 0; i < data.length; i++) { -if (data[i].mAttributesetinstanceId != null -&& !"".equals(data[i].mAttributesetinstanceId)) { - conn = this.getTransactionConnection(); - String strMAttributesetinstanceID = SequenceIdData.getUUID(); - CreateFromShipmentData.copyAttributes(conn, this, strMAttributesetinstanceID, - data[i].mAttributesetinstanceId); - CreateFromShipmentData.copyInstances(conn, this, strMAttributesetinstanceID, - data[i].mAttributesetinstanceId); - data[i].mAttributesetinstanceId = strMAttributesetinstanceID; - releaseCommitConnection(conn); -} - } -} catch (Exception e) { - try { -releaseRollbackConnection(conn); - } catch (Exception ignored) { - } - log4j.warn("Rollback in transaction"); -} } } else { if (isSOTrx.equals("Y")) diff -r be233422f299 -r 043c51805371 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql Fri Apr 30 16:45:11 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql Fri Apr 30 18:01:31 2010 +0200 @@ -515,35 +515,6 @@ - - - - INSERT INTO M_ATTRIBUTESETINSTANCE - (M_ATTRIBUTESETINSTANCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, - CREATED, CREATEDBY, UPDATED, UPDATEDBY, M_ATTRIBUTESET_ID, SERNO, - LOT, GUARANTEEDATE, DESCRIPTION, M_LOT_ID, ISLOCKED, LOCK_DESCRIPTION) - SELECT ?, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, - UPDATEDBY, M_ATTRIBUTESET_ID, SERNO, LOT, GUARANTEEDATE, DESCRIPTION, - M_LOT_ID, ISLOCKED, LOCK_DESCRIPTION FROM M_ATTRIBUTESETINSTANCE - WHERE M_ATTRIBUTESETINSTANCE_ID = ? - - - - - - - - INSERT INTO M_ATTRIBUTEINSTANCE - (M_ATTRIBUTEINSTANCE_ID, M_ATTRIBUTESETINSTANCE_ID, M_ATTRIBUTE_ID, - AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, - M_ATTRIBUTEVALUE_ID, VALUE) - SELECT GET_UUID(), ?, M_ATTRIBUTE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, - CREATED, CREATEDBY, UPDATED, UPDATEDBY, M_ATTRIBUTEVALUE_ID, VALUE FROM - M_ATTRIBUTEINSTANCE WHERE M_ATTRIBUTESETINSTANCE_ID = ? - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: Fixes issue 0008530: RFE: 2.50 Popup of copy lines for...
details: /erp/devel/pi/rev/043c51805371 changeset: 7172:043c51805371 user: Adrián Romero openbravo.com> date: Fri Apr 30 18:01:31 2010 +0200 summary: Fixes issue 0008530: RFE: 2.50 Popup of copy lines for Goods Receipt should suggest the Attribute values diffstat: src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java | 26 + src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql | 29 -- 2 files changed, 2 insertions(+), 53 deletions(-) diffs (81 lines): diff -r be233422f299 -r 043c51805371 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Fri Apr 30 16:45:11 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Fri Apr 30 18:01:31 2010 +0200 @@ -604,36 +604,14 @@ "org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO").createXmlDocument(); if (strInvoice.equals("")) { if (vars.getLanguage().equals("en_US")) { - if (isSOTrx.equals("Y")) + if (isSOTrx.equals("Y")) { data = CreateFromShipmentData.selectFromPOSOTrx(this, vars.getLanguage(), Utility .getContext(this, vars, "#User_Client", strWindowId), Utility.getContext(this, vars, "#User_Org", strWindowId), strPO); - else { + } else { data = CreateFromShipmentData.selectFromPO(this, vars.getLanguage(), Utility .getContext(this, vars, "#User_Client", strWindowId), Utility.getContext(this, vars, "#User_Org", strWindowId), strPO); -Connection conn = null; -try { - for (int i = 0; i < data.length; i++) { -if (data[i].mAttributesetinstanceId != null -&& !"".equals(data[i].mAttributesetinstanceId)) { - conn = this.getTransactionConnection(); - String strMAttributesetinstanceID = SequenceIdData.getUUID(); - CreateFromShipmentData.copyAttributes(conn, this, strMAttributesetinstanceID, - data[i].mAttributesetinstanceId); - CreateFromShipmentData.copyInstances(conn, this, strMAttributesetinstanceID, - data[i].mAttributesetinstanceId); - data[i].mAttributesetinstanceId = strMAttributesetinstanceID; - releaseCommitConnection(conn); -} - } -} catch (Exception e) { - try { -releaseRollbackConnection(conn); - } catch (Exception ignored) { - } - log4j.warn("Rollback in transaction"); -} } } else { if (isSOTrx.equals("Y")) diff -r be233422f299 -r 043c51805371 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql Fri Apr 30 16:45:11 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql Fri Apr 30 18:01:31 2010 +0200 @@ -515,35 +515,6 @@ - - - - INSERT INTO M_ATTRIBUTESETINSTANCE - (M_ATTRIBUTESETINSTANCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, - CREATED, CREATEDBY, UPDATED, UPDATEDBY, M_ATTRIBUTESET_ID, SERNO, - LOT, GUARANTEEDATE, DESCRIPTION, M_LOT_ID, ISLOCKED, LOCK_DESCRIPTION) - SELECT ?, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, - UPDATEDBY, M_ATTRIBUTESET_ID, SERNO, LOT, GUARANTEEDATE, DESCRIPTION, - M_LOT_ID, ISLOCKED, LOCK_DESCRIPTION FROM M_ATTRIBUTESETINSTANCE - WHERE M_ATTRIBUTESETINSTANCE_ID = ? - - - - - - - - INSERT INTO M_ATTRIBUTEINSTANCE - (M_ATTRIBUTEINSTANCE_ID, M_ATTRIBUTESETINSTANCE_ID, M_ATTRIBUTE_ID, - AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, - M_ATTRIBUTEVALUE_ID, VALUE) - SELECT GET_UUID(), ?, M_ATTRIBUTE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, - CREATED, CREATEDBY, UPDATED, UPDATEDBY, M_ATTRIBUTEVALUE_ID, VALUE FROM - M_ATTRIBUTEINSTANCE WHERE M_ATTRIBUTESETINSTANCE_ID = ? - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/int: 2 new changesets
details: /erp/devel/int/rev/f25b4233f7e6 changeset: 7170:f25b4233f7e6 user: Antonio Moreno openbravo.com> date: Fri Apr 30 16:13:06 2010 +0200 summary: Fixed issue 13172. NOT NULL statements will no longer be issued if the table has been recreated twice, as the constraints are already activated. details: /erp/devel/int/rev/be233422f299 changeset: 7171:be233422f299 user: Adrián Romero openbravo.com> date: Fri Apr 30 16:45:11 2010 +0200 summary: Fixes issue 0013164: PDF of Price List Report does not work diffstat: src-db/database/lib/dbsourcemanager.jar |0 src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html |2 +- 2 files changed, 1 insertions(+), 1 deletions(-) diffs (14 lines): diff -r a8e14b670548 -r be233422f299 src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r a8e14b670548 -r be233422f299 src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html --- a/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html Fri Apr 30 15:11:00 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html Fri Apr 30 16:45:11 2010 +0200 @@ -398,7 +398,7 @@ https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi-preference: [pref] downgraded debug level
details: /erp/devel/pi-preference/rev/54fdafe1441c changeset: 7188:54fdafe1441c user: Asier Lostalé openbravo.com> date: Fri Apr 30 16:53:14 2010 +0200 summary: [pref] downgraded debug level diffstat: src/org/openbravo/erpCommon/businessUtility/Preferences.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r f57cfeca868d -r 54fdafe1441c src/org/openbravo/erpCommon/businessUtility/Preferences.java --- a/src/org/openbravo/erpCommon/businessUtility/Preferences.java Fri Apr 30 16:52:28 2010 +0200 +++ b/src/org/openbravo/erpCommon/businessUtility/Preferences.java Fri Apr 30 16:53:14 2010 +0200 @@ -235,7 +235,7 @@ + (preference.getWindow() == null ? "" : (preference.getWindow().getId() + "|")) + (preference.isPropertyList() ? preference.getProperty() : preference.getAttribute()); vars.setSessionValue(prefName, preference.getSearchKey()); -log4j.info("Set preference " + prefName + " - " + preference.getSearchKey()); +log4j.debug("Set preference " + prefName + " - " + preference.getSearchKey()); } /** -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi-preference: [pef] Fixed ad_get_preference_value to make...
details: /erp/devel/pi-preference/rev/f57cfeca868d changeset: 7187:f57cfeca868d user: Asier Lostalé openbravo.com> date: Fri Apr 30 16:52:28 2010 +0200 summary: [pef] Fixed ad_get_preference_value to make it work on PG diffstat: src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diffs (41 lines): diff -r 463b648d92fc -r f57cfeca868d src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml --- a/src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml Fri Apr 30 12:17:18 2010 +0200 +++ b/src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml Fri Apr 30 16:52:28 2010 +0200 @@ -40,13 +40,14 @@ / v_ad_client_id varchar2(32); v_ad_org_id varchar2(32); - depth1 number; - depth2 number; + depth1 NUMBER; + depth2 NUMBER; + valueAssigned boolean := false; TYPE RECORD IS REF CURSOR; cur RECORD; - selPref ad_preference%rowtype := null; + selPref ad_preference%ROWTYPE; BEGIN if p_ad_client_id is null then @@ -78,8 +79,9 @@ and (ad_window_id = p_ad_window_id or aD_window_id is null) ) loop - if (selPref.ad_preference_id is null) then + if (not valueAssigned) then selPref := cur; + valueAssigned := true; continue; end if; @@ -154,7 +156,7 @@ RAISE_APPLICATION_ERROR(-2, p_PROPERTY_NAME||' @PropertyConflict@'); end loop; - if (selPref.AD_Preference_ID is null) then + if (not valueAssigned) then RAISE_APPLICATION_ERROR(-2, p_PROPERTY_NAME||' @PropertyNotFound@'); end if; -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: Fixes issue 0013164: PDF of Price List Report does not...
details: /erp/devel/pi/rev/be233422f299 changeset: 7171:be233422f299 user: Adrián Romero openbravo.com> date: Fri Apr 30 16:45:11 2010 +0200 summary: Fixes issue 0013164: PDF of Price List Report does not work diffstat: src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r f25b4233f7e6 -r be233422f299 src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html --- a/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html Fri Apr 30 16:13:06 2010 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.html Fri Apr 30 16:45:11 2010 +0200 @@ -398,7 +398,7 @@ https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: Fixed issue 13172. NOT NULL statements will no longer ...
details: /erp/devel/pi/rev/f25b4233f7e6 changeset: 7170:f25b4233f7e6 user: Antonio Moreno openbravo.com> date: Fri Apr 30 16:13:06 2010 +0200 summary: Fixed issue 13172. NOT NULL statements will no longer be issued if the table has been recreated twice, as the constraints are already activated. diffstat: src-db/database/lib/dbsourcemanager.jar |0 1 files changed, 0 insertions(+), 0 deletions(-) diffs (2 lines): diff -r a8e14b670548 -r f25b4233f7e6 src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/dbsm-main: Fixed issue 13172. NOT NULL statements will no ...
details: /erp/devel/dbsm-main/rev/d63da898ba6b changeset: 297:d63da898ba6b user: Antonio Moreno openbravo.com> date: Fri Apr 30 16:12:43 2010 +0200 summary: Fixed issue 13172. NOT NULL statements will no longer be issued if the table has been recreated twice, as the constraints are already activated. diffstat: src/org/apache/ddlutils/platform/SqlBuilder.java | 7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (31 lines): diff -r cdda8c099bb9 -r d63da898ba6b src/org/apache/ddlutils/platform/SqlBuilder.java --- a/src/org/apache/ddlutils/platform/SqlBuilder.java Wed Apr 28 11:39:53 2010 +0200 +++ b/src/org/apache/ddlutils/platform/SqlBuilder.java Fri Apr 30 16:12:43 2010 +0200 @@ -161,6 +161,7 @@ private boolean script = false; protected ArrayList recreatedTables = new ArrayList(); protected ArrayList createdTables = new ArrayList(); + protected ArrayList recreatedTablesTwice = new ArrayList(); protected ArrayList recreatedFKs = new ArrayList(); protected ArrayList recreatedPKs = new ArrayList(); @@ -1639,6 +1640,9 @@ disableAllNOTNULLColumns(realTargetTable); writeCopyDataStatement(tempTable, targetTable); dropTemporaryTable(desiredModel, tempTable); +if (recreatedTables.contains(sourceTable.getName())) { + recreatedTablesTwice.add(sourceTable.getName()); +} recreatedTables.add(sourceTable.getName()); } else { dropTable(sourceTable); @@ -1774,7 +1778,8 @@ protected void enableAllNOTNULLColumns(Table table) throws IOException { for (int i = 0; i < table.getColumnCount(); i++) { Column column = table.getColumn(i); - if (column.isRequired() && !column.isPrimaryKey()) { + if (column.isRequired() && !column.isPrimaryKey() + && !recreatedTablesTwice.contains(table.getName())) { println("ALTER TABLE " + table.getName() + " MODIFY " + getColumnName(column) + " " + getSqlType(column) + " NOT NULL"); printEndOfStatement(); -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: fixed bug 11719: Read only logic does not work for sel...
details: /erp/devel/pi/rev/a8e14b670548 changeset: 7169:a8e14b670548 user: Asier Lostalé openbravo.com> date: Fri Apr 30 15:11:00 2010 +0200 summary: fixed bug 11719: Read only logic does not work for selectors diffstat: src-wad/src/org/openbravo/wad/WadUtility.java | 4 +--- src-wad/src/org/openbravo/wad/controls/WADControl.java | 7 +++ src-wad/src/org/openbravo/wad/controls/WADList.java| 4 src-wad/src/org/openbravo/wad/controls/WADSearch.java | 4 4 files changed, 16 insertions(+), 3 deletions(-) diffs (53 lines): diff -r e695aa3ac930 -r a8e14b670548 src-wad/src/org/openbravo/wad/WadUtility.java --- a/src-wad/src/org/openbravo/wad/WadUtility.java Fri Apr 30 14:28:06 2010 +0200 +++ b/src-wad/src/org/openbravo/wad/WadUtility.java Fri Apr 30 15:11:00 2010 +0200 @@ -835,9 +835,7 @@ return ""; } StringBuffer _displayLogic = new StringBuffer(); -String element = auxControl.getData("ColumnName"); -if (auxControl.getType().equals("Combo")) - element = "report" + element + "_S"; +String element = auxControl.getReadOnlyLogicColumn(); _displayLogic.append(" readOnlyLogicElement('").append(element).append("', (").append( displayLogic(code, vecDL, parentsFieldsData, vecAuxiliar, vecFields, windowId, vecContext)) diff -r e695aa3ac930 -r a8e14b670548 src-wad/src/org/openbravo/wad/controls/WADControl.java --- a/src-wad/src/org/openbravo/wad/controls/WADControl.javaFri Apr 30 14:28:06 2010 +0200 +++ b/src-wad/src/org/openbravo/wad/controls/WADControl.javaFri Apr 30 15:11:00 2010 +0200 @@ -583,4 +583,11 @@ xmlDocument.setParameter("columnName", getData("ColumnName")); return replaceHTML(xmlDocument.print()); } + + /** + * Returns the HTML element to set in the read only logic + */ + public String getReadOnlyLogicColumn() { +return getData("columnName"); + } } diff -r e695aa3ac930 -r a8e14b670548 src-wad/src/org/openbravo/wad/controls/WADList.java --- a/src-wad/src/org/openbravo/wad/controls/WADList.java Fri Apr 30 14:28:06 2010 +0200 +++ b/src-wad/src/org/openbravo/wad/controls/WADList.java Fri Apr 30 15:11:00 2010 +0200 @@ -306,4 +306,8 @@ public boolean isText() { return true; } + + public String getReadOnlyLogicColumn() { +return "report" + getData("columnName") + "_S"; + } } diff -r e695aa3ac930 -r a8e14b670548 src-wad/src/org/openbravo/wad/controls/WADSearch.java --- a/src-wad/src/org/openbravo/wad/controls/WADSearch.java Fri Apr 30 14:28:06 2010 +0200 +++ b/src-wad/src/org/openbravo/wad/controls/WADSearch.java Fri Apr 30 15:11:00 2010 +0200 @@ -492,4 +492,8 @@ } return displayLogic.toString(); } + + public String getReadOnlyLogicColumn() { +return getData("columnName") + "_R"; + } } -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: fixed bug 13034: UI components cannot be created in a ...
details: /erp/devel/pi/rev/e695aa3ac930 changeset: 7168:e695aa3ac930 user: Asier Lostalé openbravo.com> date: Fri Apr 30 14:28:06 2010 +0200 summary: fixed bug 13034: UI components cannot be created in a module which is not Translation Required diffstat: src-db/database/model/triggers/AD_MODULE_TRANSLATION_TRG.xml | 113 --- 1 files changed, 0 insertions(+), 113 deletions(-) diffs (117 lines): diff -r 356162f0fe0d -r e695aa3ac930 src-db/database/model/triggers/AD_MODULE_TRANSLATION_TRG.xml --- a/src-db/database/model/triggers/AD_MODULE_TRANSLATION_TRG.xml Fri Apr 30 13:57:48 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,113 +0,0 @@ - - - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/int: 2 new changesets
details: /erp/devel/int/rev/0d80d55c133f changeset: 7164:0d80d55c133f user: Asier Lostalé openbravo.com> date: Fri Apr 30 13:08:30 2010 +0200 summary: fixed bug 12175: Deploy mode 'none' doesn't work properly. details: /erp/devel/int/rev/fba8bb3038a6 changeset: 7165:fba8bb3038a6 user: Asier Lostalé openbravo.com> date: Fri Apr 30 13:23:53 2010 +0200 summary: fixed bug 12958: comple with deploy.mode=war does not call generate.entities diffstat: build.xml | 5 +++-- src/build.xml | 11 --- 2 files changed, 7 insertions(+), 9 deletions(-) diffs (63 lines): diff -r b9e8574569f7 -r fba8bb3038a6 build.xml --- a/build.xml Fri Apr 30 12:27:53 2010 +0200 +++ b/build.xml Fri Apr 30 13:23:53 2010 +0200 @@ -352,7 +352,7 @@ property="test.md5.wad"/> - + @@ -364,7 +364,7 @@ - + @@ -377,6 +377,7 @@ + diff -r b9e8574569f7 -r fba8bb3038a6 src/build.xml --- a/src/build.xml Fri Apr 30 12:27:53 2010 +0200 +++ b/src/build.xml Fri Apr 30 13:23:53 2010 +0200 @@ -782,7 +782,7 @@ - + @@ -792,18 +792,15 @@ + + + - - - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: fixed bug 12958: comple with deploy.mode=war does not ...
details: /erp/devel/pi/rev/fba8bb3038a6 changeset: 7165:fba8bb3038a6 user: Asier Lostalé openbravo.com> date: Fri Apr 30 13:23:53 2010 +0200 summary: fixed bug 12958: comple with deploy.mode=war does not call generate.entities diffstat: build.xml | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 0d80d55c133f -r fba8bb3038a6 build.xml --- a/build.xml Fri Apr 30 13:08:30 2010 +0200 +++ b/build.xml Fri Apr 30 13:23:53 2010 +0200 @@ -377,6 +377,7 @@ + -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: fixed bug 12175: Deploy mode 'none' doesn't work prope...
details: /erp/devel/pi/rev/0d80d55c133f changeset: 7164:0d80d55c133f user: Asier Lostalé openbravo.com> date: Fri Apr 30 13:08:30 2010 +0200 summary: fixed bug 12175: Deploy mode 'none' doesn't work properly. diffstat: build.xml | 4 ++-- src/build.xml | 11 --- 2 files changed, 6 insertions(+), 9 deletions(-) diffs (55 lines): diff -r b9e8574569f7 -r 0d80d55c133f build.xml --- a/build.xml Fri Apr 30 12:27:53 2010 +0200 +++ b/build.xml Fri Apr 30 13:08:30 2010 +0200 @@ -352,7 +352,7 @@ property="test.md5.wad"/> - + @@ -364,7 +364,7 @@ - + diff -r b9e8574569f7 -r 0d80d55c133f src/build.xml --- a/src/build.xml Fri Apr 30 12:27:53 2010 +0200 +++ b/src/build.xml Fri Apr 30 13:08:30 2010 +0200 @@ -782,7 +782,7 @@ - + @@ -792,18 +792,15 @@ + + + - - - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/int: Fixes issue 13163: Cannot complete a sales/purchase i...
details: /erp/devel/int/rev/b9e8574569f7 changeset: 7163:b9e8574569f7 user: David Alsasua openbravo.com> date: Fri Apr 30 12:27:53 2010 +0200 summary: Fixes issue 13163: Cannot complete a sales/purchase invoice diffstat: src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml | 6 +- src-db/database/model/triggers/C_INVOICELINE_TRG4.xml | 39 -- 2 files changed, 5 insertions(+), 40 deletions(-) diffs (66 lines): diff -r 2aa4f1cdec7c -r b9e8574569f7 src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml --- a/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml Thu Apr 29 17:15:58 2010 +0200 +++ b/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml Fri Apr 30 12:27:53 2010 +0200 @@ -18,7 +18,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-2009 Openbravo SLU +* All portions are Copyright (C) 2001-2010 Openbravo SLU * All Rights Reserved. * Contributor(s): __. / @@ -79,6 +79,10 @@ WHERE C_CURRENCY_ID=v_Currency; :NEW.LineNetAmt:=ROUND(:NEW.LineNetAmt, v_Prec) ; :NEW.ChargeAmt:=ROUND(:NEW.ChargeAmt, v_Prec) ; + +IF (ROUND(TO_NUMBER(:NEW.QTYINVOICED) * TO_NUMBER(:NEW.PRICEACTUAL),v_Prec)!=TO_NUMBER(:NEW.LINENETAMT)) THEN + RAISE_APPLICATION_ERROR(-2, '@LineAmountNotCorrect@') ; +END IF; END IF; END C_INVLINE_CHK_RESTRICTIONS_TRG ]]> diff -r 2aa4f1cdec7c -r b9e8574569f7 src-db/database/model/triggers/C_INVOICELINE_TRG4.xml --- a/src-db/database/model/triggers/C_INVOICELINE_TRG4.xml Thu Apr 29 17:15:58 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,39 +0,0 @@ - - - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: Fixes issue 13163: Cannot complete a sales/purchase in...
details: /erp/devel/pi/rev/b9e8574569f7 changeset: 7163:b9e8574569f7 user: David Alsasua openbravo.com> date: Fri Apr 30 12:27:53 2010 +0200 summary: Fixes issue 13163: Cannot complete a sales/purchase invoice diffstat: src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml | 6 +- src-db/database/model/triggers/C_INVOICELINE_TRG4.xml | 39 -- 2 files changed, 5 insertions(+), 40 deletions(-) diffs (66 lines): diff -r 2aa4f1cdec7c -r b9e8574569f7 src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml --- a/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml Thu Apr 29 17:15:58 2010 +0200 +++ b/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml Fri Apr 30 12:27:53 2010 +0200 @@ -18,7 +18,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-2009 Openbravo SLU +* All portions are Copyright (C) 2001-2010 Openbravo SLU * All Rights Reserved. * Contributor(s): __. / @@ -79,6 +79,10 @@ WHERE C_CURRENCY_ID=v_Currency; :NEW.LineNetAmt:=ROUND(:NEW.LineNetAmt, v_Prec) ; :NEW.ChargeAmt:=ROUND(:NEW.ChargeAmt, v_Prec) ; + +IF (ROUND(TO_NUMBER(:NEW.QTYINVOICED) * TO_NUMBER(:NEW.PRICEACTUAL),v_Prec)!=TO_NUMBER(:NEW.LINENETAMT)) THEN + RAISE_APPLICATION_ERROR(-2, '@LineAmountNotCorrect@') ; +END IF; END IF; END C_INVLINE_CHK_RESTRICTIONS_TRG ]]> diff -r 2aa4f1cdec7c -r b9e8574569f7 src-db/database/model/triggers/C_INVOICELINE_TRG4.xml --- a/src-db/database/model/triggers/C_INVOICELINE_TRG4.xml Thu Apr 29 17:15:58 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,39 +0,0 @@ - - - - - - -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi-preference: [pref] PL getter test cases
details: /erp/devel/pi-preference/rev/463b648d92fc changeset: 7186:463b648d92fc user: Asier Lostalé openbravo.com> date: Fri Apr 30 12:17:18 2010 +0200 summary: [pref] PL getter test cases diffstat: src-test/org/openbravo/test/preference/PreferenceTest.java | 149 - 1 files changed, 148 insertions(+), 1 deletions(-) diffs (219 lines): diff -r c56de1b4b950 -r 463b648d92fc src-test/org/openbravo/test/preference/PreferenceTest.java --- a/src-test/org/openbravo/test/preference/PreferenceTest.javaFri Apr 30 12:16:15 2010 +0200 +++ b/src-test/org/openbravo/test/preference/PreferenceTest.javaFri Apr 30 12:17:18 2010 +0200 @@ -18,6 +18,10 @@ */ package org.openbravo.test.preference; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.List; import org.hibernate.criterion.Expression; @@ -29,6 +33,7 @@ import org.openbravo.erpCommon.utility.PropertyConflictException; import org.openbravo.erpCommon.utility.PropertyException; import org.openbravo.model.ad.access.Role; +import org.openbravo.model.ad.access.User; import org.openbravo.model.ad.domain.Preference; import org.openbravo.model.ad.system.Client; import org.openbravo.model.ad.ui.Window; @@ -100,6 +105,20 @@ assertEquals("Not found expected value.", "salesValue", value); } + public void testPLPropertyGet() throws SQLException { +setSystemAdministratorContext(); +String value = getPLPreference("testProperty", false, OBContext.getOBContext() +.getCurrentClient(), OBContext.getOBContext().getCurrentOrganization(), OBContext +.getOBContext().getUser(), OBContext.getOBContext().getRole(), null); +assertEquals("Not found expected value.", "newValue", value); + +Role role = OBDal.getInstance().get(Role.class, "101"); // Sales +value = getPLPreference("testProperty", false, OBContext.getOBContext().getCurrentClient(), +OBContext.getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(), +role, null); +assertEquals("Not found expected value.", "salesValue", value); + } + public void testWindowVisibility() throws PropertyException { setSystemAdministratorContext(); Window window = OBDal.getInstance().get(Window.class, "276"); // Alert window @@ -132,6 +151,34 @@ assertEquals("Not found expected value.", "alertSales", value); } + public void testPLWindowVisibility() throws SQLException { +setSystemAdministratorContext(); +Window window = OBDal.getInstance().get(Window.class, "276"); // Alert window +Preferences.setPreferenceValue("testProperty", "alertGeneral", false, null, null, null, null, +window, null); + +Role role = OBDal.getInstance().get(Role.class, "101"); // Sales +String value = getPLPreference("testProperty", false, OBContext.getOBContext() +.getCurrentClient(), OBContext.getOBContext().getCurrentOrganization(), OBContext +.getOBContext().getUser(), OBContext.getOBContext().getRole(), null); +assertEquals("Not found expected value.", "newValue", value); + +value = getPLPreference("testProperty", false, OBContext.getOBContext().getCurrentClient(), +OBContext.getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(), +role, null); +assertEquals("Not found expected value.", "salesValue", value); + +value = getPLPreference("testProperty", false, OBContext.getOBContext().getCurrentClient(), +OBContext.getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(), +OBContext.getOBContext().getRole(), window); +assertEquals("Not found expected value.", "alertGeneral", value); + +value = getPLPreference("testProperty", false, OBContext.getOBContext().getCurrentClient(), +OBContext.getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(), +role, window); +assertEquals("Not found expected value.", "alertSales", value); + } + public void testOrgVisibility() throws PropertyException { setSystemAdministratorContext(); Client client = OBDal.getInstance().get(Client.class, "100"); @@ -179,6 +226,43 @@ } + public void testPLOrgVisibility() throws SQLException { + +setSystemAdministratorContext(); +Client client = OBDal.getInstance().get(Client.class, "100"); +Organization orgB = OBDal.getInstance().get(Organization.class, "105"); +Organization orgB1 = OBDal.getInstance().get(Organization.class, "106"); +Organization orgB2 = OBDal.getInstance().get(Organization.class, "107"); +Organization orgB11 = OBDal.getInstance().get(Organization.class, "108"); +Organization orgB12 = OBDal.getInstance().get(Organization.class, "109"); + +String value = getPLPreference("testProperty", false, OBContext.getOBContext() +.getCurrentClient(), OBContex
[OpenbravoERP-commits] devel/pi-preference: [pref] Added AD_GET_PREFERENCE_VALUE pl fun...
details: /erp/devel/pi-preference/rev/c56de1b4b950 changeset: 7185:c56de1b4b950 user: Asier Lostalé openbravo.com> date: Fri Apr 30 12:16:15 2010 +0200 summary: [pref] Added AD_GET_PREFERENCE_VALUE pl function diffstat: src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml | 165 1 files changed, 165 insertions(+), 0 deletions(-) diffs (169 lines): diff -r 8ab0147a12f1 -r c56de1b4b950 src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml Fri Apr 30 12:16:15 2010 +0200 @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits