[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/fcdd0ba58ca1 changeset: 6075:fcdd0ba58ca1 user: Martin Taal openbravo.com> date: Wed Feb 10 12:58:09 2010 +0100 summary: Fixes issue 12202: OBQuery does not support list parameter details: /erp/erp/devel/pi/rev/d95f7660d2cd changeset: 6076:d95f7660d2cd user: Martin Taal openbravo.com> date: Wed Feb 10 12:58:40 2010 +0100 summary: Fixes issue 12201: OBContext is not using system language as default language details: /erp/erp/devel/pi/rev/9a695d581e4e changeset: 6077:9a695d581e4e user: Martin Taal openbravo.com> date: Wed Feb 10 12:59:08 2010 +0100 summary: Testcases for fixes issues 12201, 12202 and 12143 diffstat: src-test/org/openbravo/test/dal/IssuesTest.java | 56 - src/org/openbravo/dal/core/OBContext.java | 4 +- src/org/openbravo/dal/service/OBQuery.java | 3 + 3 files changed, 60 insertions(+), 3 deletions(-) diffs (134 lines): diff -r 2cc77f70e267 -r 9a695d581e4e src-test/org/openbravo/test/dal/IssuesTest.java --- a/src-test/org/openbravo/test/dal/IssuesTest.java Wed Feb 10 12:48:28 2010 +0100 +++ b/src-test/org/openbravo/test/dal/IssuesTest.java Wed Feb 10 12:59:08 2010 +0100 @@ -23,12 +23,15 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.List; import org.apache.log4j.Logger; import org.hibernate.criterion.Expression; import org.openbravo.base.provider.OBProvider; +import org.openbravo.dal.core.OBContext; import org.openbravo.dal.service.OBCriteria; import org.openbravo.dal.service.OBDal; +import org.openbravo.dal.service.OBQuery; import org.openbravo.dal.xml.EntityXMLException; import org.openbravo.dal.xml.XMLTypeConverter; import org.openbravo.data.UtilSql; @@ -36,6 +39,8 @@ import org.openbravo.model.ad.system.Language; import org.openbravo.model.ad.ui.Form; import org.openbravo.model.ad.ui.FormTrl; +import org.openbravo.model.ad.ui.Message; +import org.openbravo.model.common.enterprise.Organization; import org.openbravo.test.base.BaseTest; /** @@ -44,6 +49,13 @@ * - https://issues.openbravo.com/view.php?id=11461 When saving business object in S/C data level * then access level exception is thrown for the child object * + * - https://issues.openbravo.com/view.php?id=12202 OBQuery does not support list parameter + * + * - https://issues.openbravo.com/view.php?id=12201 OBContext is not using system language as + * default language + * + * - https://issues.openbravo.com/view.php?id=12143 OBQuery class should add convenience method + * uniqueResult similar to the OBCriteria class * * @author mtaal * @author iperdomo @@ -53,6 +65,48 @@ private static final Logger log = Logger.getLogger(IssuesTest.class); /** + * Tests issue: https://issues.openbravo.com/view.php?id=12202 + */ + public void test12202() { +setSystemAdministratorContext(); +final List modules = OBDal.getInstance().createCriteria(Module.class).list(); + +final OBQuery messages = OBDal.getInstance().createQuery(Message.class, +"module in (:modules)"); +messages.setNamedParameter("modules", modules); +assertFalse(messages.list().isEmpty()); + + } + + /** + * Tests issue: https://issues.openbravo.com/view.php?id=12201 + */ + public void test12201() { +setSystemAdministratorContext(); +assertEquals("0", OBContext.getOBContext().getUser().getId()); +assertTrue(null == OBContext.getOBContext().getUser().getDefaultLanguage()); +assertTrue(OBContext.getOBContext().getLanguage().isSystemLanguage()); + } + + /** + * Tests issue: https://issues.openbravo.com/view.php?id=12143 + */ + public void test12143() { +setSystemAdministratorContext(); +final OBQuery messages = OBDal.getInstance().createQuery(Message.class, null); +try { + messages.uniqueResult(); + fail(); +} catch (Exception e) { + // should fail as there is more than one result +} +final OBQuery organizations = OBDal.getInstance().createQuery(Organization.class, +"id='0'"); +final Organization organization = organizations.uniqueResult(); +assertNotNull(organization); + } + + /** * Tests issue: https://issues.openbravo.com/view.php?id=11812 */ public void test11812() { @@ -82,7 +136,7 @@ form.setDescription("description"); form.setHelpComment("help"); form.setModule(module); -form.setJavaClassName("org.openbravo.test"); +form.setJavaClassName(module.getJavaPackage() + ".test"); FormTrl formTrl = OBProvider.getInstance().get(FormTrl.class); formTrl.setHelpComment("help"); diff -r 2cc77f70e267 -r 9a695d581e4e src/org/openbravo/dal/core/OBContext.java --- a/src/org/openbravo/dal/core/OBContext.java Wed Feb 10 12:48:28 2010 +0100 +++ b/src/org/openbravo/dal/core/OBContext.java Wed Feb 10 12:59:08 2010 +0100 @@ -619,8 +619,8 @@ setLanguage(getUser().getDefaultLanguage());
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/fe94f3e1a8c9 changeset: 6041:fe94f3e1a8c9 user: Antonio Moreno openbravo.com> date: Wed Feb 03 19:18:21 2010 +0100 summary: Fixed small display issue in the new rebuild window (some messages are shown in the previous task details: /erp/erp/devel/pi/rev/ea3e82974e4e changeset: 6042:ea3e82974e4e user: Antonio Moreno openbravo.com> date: Thu Feb 04 19:20:20 2010 +0100 summary: Removing redundant generate.entities in apply.modules details: /erp/erp/devel/pi/rev/77fb11772ddd changeset: 6043:77fb11772ddd user: Antonio Moreno openbravo.com> date: Fri Feb 05 13:10:22 2010 +0100 summary: Removed wrong sql statement in postupdate which set all modules as InDevelopment='N' after each update.database. Forced update.database to always execute apply.module. diffstat: build.xml | 10 +++--- src-db/database/build.xml | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diffs (63 lines): diff -r 7766517cbc26 -r 77fb11772ddd build.xml --- a/build.xml Fri Feb 05 14:40:28 2010 +0530 +++ b/build.xml Fri Feb 05 13:10:22 2010 +0100 @@ -554,7 +554,7 @@ - + @@ -577,10 +577,6 @@ - - - - @@ -592,9 +588,8 @@ - + - @@ -624,6 +619,7 @@ + diff -r 7766517cbc26 -r 77fb11772ddd src-db/database/build.xml --- a/src-db/database/build.xml Fri Feb 05 14:40:28 2010 +0530 +++ b/src-db/database/build.xml Fri Feb 05 13:10:22 2010 +0100 @@ -179,7 +179,7 @@ UPDATE AD_SYSTEM_INFO SET CODE_REVISION=SUBSTR('${code.revision}',1,60); CALL AD_UPDATE_ACCESS(); - UPDATE AD_MODULE SET ISINDEVELOPMENT='N', ISDEFAULT='N', SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL, ISREGISTERED='N' WHERE STATUS IS NULL OR STATUS='I'; + UPDATE AD_MODULE SET SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL WHERE STATUS IS NULL OR STATUS='I'; CALL AD_LANGUAGE_CREATE(NULL); @@ -196,7 +196,7 @@ UPDATE AD_SYSTEM_INFO SET CODE_REVISION=SUBSTR('${code.revision}',1,60); SELECT AD_UPDATE_ACCESS(); - UPDATE AD_MODULE SET ISINDEVELOPMENT='N', ISDEFAULT='N', SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL, ISREGISTERED='N' WHERE STATUS IS NULL OR STATUS='I'; + UPDATE AD_MODULE SET SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL WHERE STATUS IS NULL OR STATUS='I'; SELECT AD_LANGUAGE_CREATE(NULL); -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/293034f21222 changeset: 5800:293034f21222 user: Rafa Roda Palacios openbravo.com> date: Fri Jan 08 14:16:31 2010 +0100 summary: Related to issue 11618. Related to issue 11464. Backed out previous fix. details: /erp/erp/devel/pi/rev/35251d20ffb1 changeset: 5801:35251d20ffb1 user: Rafa Roda Palacios openbravo.com> date: Fri Jan 08 17:16:38 2010 +0100 summary: Fixes issue 11464 Fixed M_REQUISITION_CREATEPO in order to properly calculate price adjustments and discounts. details: /erp/erp/devel/pi/rev/63e7d6c5520a changeset: 5802:63e7d6c5520a user: Rafa Roda Palacios openbravo.com> date: Fri Jan 08 17:42:09 2010 +0100 summary: Fixes issue 11618 Requisition To Order process has been fixed to calculate properly Price Adjustments defined for Price Lists. diffstat: src-db/database/model/functions/M_REQUISITION_CREATEPO.xml| 11 ++-- src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java | 14 ++-- src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql | 24 ++--- 3 files changed, 19 insertions(+), 30 deletions(-) diffs (140 lines): diff -r 92ea03a8edc6 -r 63e7d6c5520a src-db/database/model/functions/M_REQUISITION_CREATEPO.xml --- a/src-db/database/model/functions/M_REQUISITION_CREATEPO.xmlFri Jan 08 12:37:02 2010 +0530 +++ b/src-db/database/model/functions/M_REQUISITION_CREATEPO.xmlFri Jan 08 17:42:09 2010 +0100 @@ -16,7 +16,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL -* All portions are Copyright (C) 2008-2009 Openbravo SL +* All portions are Copyright (C) 2008-2010 Openbravo SL * All Rights Reserved. * Contributor(s): __. / @@ -219,14 +219,13 @@ Ad_Sequence_Next('C_OrderLine', v_Client_ID, v_COrderLine_ID); SELECT pp.PRICELIST, pp.PRICELIMIT, pp.PRICESTD, - ROUND(COALESCE(Cur_Lines.PRICEACTUAL, M_GET_OFFERS_PRICE(TO_DATE(p_OrderDate), Cur_Lines.C_BPID, Cur_Lines.M_Product_ID, COALESCE(Cur_Lines.PRICEACTUAL, pp.PRICESTD), TO_NUMBER(Cur_Lines.QTY - Cur_Lines.ORDEREDQTY), Cur_Lines.PRICELIST_ID)), CUR.PRICEPRECISION), - ROUND((COALESCE(pp.PRICELIST, Cur_Lines.PRICELIST, Cur_Lines.PRICEACTUAL) - COALESCE(Cur_Lines.PRICEACTUAL, M_GET_OFFERS_PRICE(TO_DATE(p_OrderDate), Cur_Lines.C_BPID, Cur_Lines.M_Product_ID, COALESCE(Cur_Lines.PRICEACTUAL, pp.PRICESTD),TO_NUMBER(Cur_Lines.QTY - Cur_Lines.ORDEREDQTY), Cur_Lines.PRICELIST_ID)))/ - COALESCE(pp.PRICELIST, Cur_Lines.PRICELIST, Cur_Lines.PRICEACTUAL)*100,CUR.STDPRECISION) + ROUND(M_GET_OFFERS_PRICE(TO_DATE(p_OrderDate),Cur_Lines.C_BPID,Cur_Lines.M_Product_ID,COALESCE(Cur_Lines.PRICEACTUAL, pp.PRICESTD),Cur_Lines.QTY - Cur_Lines.ORDEREDQTY,Cur_Lines.PRICELIST_ID),CUR.PRICEPRECISION), + ROUND((pp.PRICELIST - pp.PRICESTD)/pp.PRICELIST*100,CUR.STDPRECISION) INTO v_PriceList, v_PriceLimit, v_PriceStd, v_PriceActual, v_Discount FROM -(SELECT COALESCE(MAX(M_PRODUCTPRICE.PRICELIST), Cur_Lines.PRICELIST, Cur_Lines.PRICEACTUAL) AS PRICELIST, +(SELECT COALESCE(Cur_Lines.PRICELIST, MAX(M_PRODUCTPRICE.PRICELIST), Cur_Lines.PRICEACTUAL) AS PRICELIST, COALESCE(MAX(M_PRODUCTPRICE.PRICELIMIT), Cur_Lines.PRICEACTUAL) AS PRICELIMIT, - COALESCE(MAX(M_PRODUCTPRICE.PRICESTD), Cur_Lines.PRICEACTUAL) AS PRICESTD + COALESCE(Cur_Lines.PRICEACTUAL, MAX(M_PRODUCTPRICE.PRICESTD)) AS PRICESTD FROM M_PRODUCTPRICE WHERE M_PRICELIST_VERSION_ID = M_GET_PRICELIST_VERSION(Cur_Lines.PRICELIST_ID, p_OrderDate) AND M_PRODUCT_ID = Cur_Lines.M_PRODUCT_ID) pp, (SELECT PRICEPRECISION, STDPRECISION FROM C_CURRENCY WHERE C_CURRENCY_ID = v_Currency_ID) CUR; diff -r 92ea03a8edc6 -r 63e7d6c5520a src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java --- a/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java Fri Jan 08 12:37:02 2010 +0530 +++ b/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java Fri Jan 08 17:42:09 2010 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL - * All portions are Copyright (C) 2008-2009 Openbravo SL + * All portions are Copyright (C) 2008-2010 Openbravo SL * All Rights Reserved. * Contributor(s): __. @@ -485,11 +485,11 @@ BigDecimal qtyOrder = new BigDecimal("0"); boolean insertLine = false; - RequisitionToOrderData[] lines = RequisitionToOrderData.linesToOrder(this, strOrderDate, - RequisitionToOrderData.cBPartnerLocationId(this, strVendor), strPriceListVersionId, - c
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/46cd75072c4c changeset: 5729:46cd75072c4c user: Mikel Irurita openbravo.com> date: Tue Dec 15 11:43:13 2009 +0100 summary: Fixes issue 0011726: Document types: * organization problem with combo reload details: /erp/erp/devel/pi/rev/435afe3a57fa changeset: 5730:435afe3a57fa user: Mikel Irurita openbravo.com> date: Tue Dec 15 11:50:53 2009 +0100 summary: Merge from pi to piengdev details: /erp/erp/devel/pi/rev/9bcf01470339 changeset: 5731:9bcf01470339 user: Mikel Irurita openbravo.com> date: Tue Dec 15 12:27:44 2009 +0100 summary: Merge from pi to piengdev diffstat: src-db/database/lib/dbsourcemanager.jar |0 src-db/database/model/functions/AD_TABLE_IMPORT.xml |6 +- src-db/database/model/functions/M_REQUISITION_CREATEPO.xml| 10 +- src-db/database/sourcedata/AD_COLUMN.xml |8 +- src-db/database/sourcedata/AD_REFERENCE.xml | 11 + src-db/database/sourcedata/AD_REF_LIST.xml| 22 ++ src-db/database/sourcedata/AD_REF_TABLE.xml |2 +- src-wad/src/org/openbravo/wad/Template_ActionButton.html |6 +- src-wad/src/org/openbravo/wad/validation/WADValidationResult.java | 13 +- src/build.xml |2 +- src/org/openbravo/erpCommon/ad_forms/DocPayment.java | 52 - src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java |7 +- src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql|2 + src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java | 10 +- src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql | 22 +- src/org/openbravo/erpCommon/businessUtility/Buscador.java | 87 + src/org/openbravo/erpCommon/info/ProjectMultiple.html |2 +- src/org/openbravo/erpCommon/info/ProjectMultiple.java |2 +- src/org/openbravo/erpCommon/info/ProjectMultiple.xml |2 +- src/org/openbravo/erpCommon/info/ProjectMultiple_data.xsql|2 +- src/org/openbravo/service/system/DatabaseValidator.java |3 +- 21 files changed, 142 insertions(+), 129 deletions(-) diffs (truncated from 648 to 300 lines): diff -r 30243ebe1648 -r 9bcf01470339 src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r 30243ebe1648 -r 9bcf01470339 src-db/database/model/functions/AD_TABLE_IMPORT.xml --- a/src-db/database/model/functions/AD_TABLE_IMPORT.xml Mon Dec 14 12:22:42 2009 +0100 +++ b/src-db/database/model/functions/AD_TABLE_IMPORT.xml Tue Dec 15 12:27:44 2009 +0100 @@ -210,11 +210,9 @@ IF(v_AD_Reference_ID IS NULL) THEN IF(Cur_Column.Data_Type IN('CHAR','BPCHAR') AND Cur_Column.Data_Length=1) THEN v_AD_Reference_ID:='20'; -ELSIF(Cur_Column.Data_Type IN('VARCHAR2', 'NVARCHAR2', 'CHAR', 'NCHAR') AND Cur_Column.Data_Length=4000) THEN +ELSIF(Cur_Column.Data_Type IN('VARCHAR', 'VARCHAR2', 'NVARCHAR2', 'CHAR', 'NCHAR') AND Cur_Column.Data_Length=4000) THEN v_AD_Reference_ID:='14'; -ELSIF(Cur_Column.Data_Type IN('VARCHAR2', 'NVARCHAR2', 'CHAR', 'NCHAR')) THEN - v_AD_Reference_ID:='10'; -ELSIF(Cur_Column.Data_Type IN('VARCHAR2', 'NVARCHAR2', 'CHAR', 'NCHAR')) THEN +ELSIF(Cur_Column.Data_Type IN('VARCHAR', 'VARCHAR2', 'NVARCHAR2', 'CHAR', 'NCHAR')) THEN v_AD_Reference_ID:='10'; ELSIF(Cur_Column.Data_Type='NUMBER' AND Cur_Column.DATA_SCALE=0) THEN v_AD_Reference_ID:='11'; diff -r 30243ebe1648 -r 9bcf01470339 src-db/database/model/functions/M_REQUISITION_CREATEPO.xml --- a/src-db/database/model/functions/M_REQUISITION_CREATEPO.xmlMon Dec 14 12:22:42 2009 +0100 +++ b/src-db/database/model/functions/M_REQUISITION_CREATEPO.xmlTue Dec 15 12:27:44 2009 +0100 @@ -16,7 +16,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL -* All portions are Copyright (C) 2008 Openbravo SL +* All portions are Copyright (C) 2008-2009 Openbravo SL * All Rights Reserved. * Contributor(s): __. / @@ -219,9 +219,9 @@ Ad_Sequence_Next('C_OrderLine', v_Client_ID, v_COrderLine_ID); SELECT pp.PRICELIST, pp.PRICELIMIT, pp.PRICESTD, - ROUND(M_GET_OFFERS_PRICE(TO_DATE(p_OrderDate),Cur_Lines.C_BPID,Cur_Lines.M_Product_ID,COALESCE(Cur_Lines.PRICEACTUAL, pp.PRICESTD),Cur_Lines.QTY - Cur_Lines.ORDEREDQTY,v_PriceList),CUR.PRICEPRECISION), - ROUND((COALESCE(pp.PRICELIST, Cur_Lines.PRICELIST, Cur_Lines.PRICEACTUAL) - COALESCE(Cur_Lines.PRICEACTUAL, pp.PRICESTD))/ - COALESCE(pp.PRICELIST, Cu
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/4cb0d4d3bfd2 changeset: 5639:4cb0d4d3bfd2 user: Martin Taal openbravo.com> date: Tue Dec 08 16:40:50 2009 +0100 summary: fixes issue 11681: Hibernate actions are not flushed before DalConnectionProvider is used details: /erp/erp/devel/pi/rev/9acedbca193d changeset: 5640:9acedbca193d user: Martin Taal openbravo.com> date: Tue Dec 08 16:41:52 2009 +0100 summary: fixes issue 11684: LazyInitializationException when exporting ADTreeNode in REST webservice details: /erp/erp/devel/pi/rev/c021f8b29557 changeset: 5641:c021f8b29557 user: Martin Taal openbravo.com> date: Tue Dec 08 16:43:55 2009 +0100 summary: fixes issue 11568: Heartbeat uses multiple database connections and closes connection too early diffstat: src/org/openbravo/dal/service/OBDal.java | 8 ++ src/org/openbravo/dal/xml/EntityXMLConverter.java | 59 +- src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java | 6 + src/org/openbravo/service/db/DalConnectionProvider.java | 13 ++- 4 files changed, 62 insertions(+), 24 deletions(-) diffs (147 lines): diff -r a203beb3a499 -r c021f8b29557 src/org/openbravo/dal/service/OBDal.java --- a/src/org/openbravo/dal/service/OBDal.java Mon Dec 07 22:45:42 2009 +0100 +++ b/src/org/openbravo/dal/service/OBDal.java Tue Dec 08 16:43:55 2009 +0100 @@ -72,9 +72,17 @@ } /** + * Returns the connection used by the hibernate session. + * + * Note: flushes the hibernate session before returning the connection. + * * @return the current database connection + * @see #flush() */ public Connection getConnection() { +// before returning a connection always flush all other hibernate actions +// to the database. +flush(); return ((SessionImplementor) SessionHandler.getInstance().getSession()).connection(); } diff -r a203beb3a499 -r c021f8b29557 src/org/openbravo/dal/xml/EntityXMLConverter.java --- a/src/org/openbravo/dal/xml/EntityXMLConverter.java Mon Dec 07 22:45:42 2009 +0100 +++ b/src/org/openbravo/dal/xml/EntityXMLConverter.java Tue Dec 08 16:43:55 2009 +0100 @@ -227,31 +227,34 @@ xmlHandler.startElement(XMLConstants.OPENBRAVO_NAMESPACE, XMLConstants.OB_ROOT_ELEMENT, "ob:" + XMLConstants.OB_ROOT_ELEMENT, rootAttrs); - boolean firstRound = true; - while (toProcess.size() > 0 || dataScroller != null) { -if (dataScroller != null) { - int cnt = 0; - while (dataScroller.next()) { -export((BaseOBObject) dataScroller.get(0), !firstRound); -getOutput().flush(); -if ((cnt++ % 100) == 0) { - OBDal.getInstance().getSession().clear(); -} + boolean exportBecauseReferenced = false; + // do the data scrollers + if (dataScroller != null) { +int cnt = 0; +while (dataScroller.next()) { + export((BaseOBObject) dataScroller.get(0), false); + getOutput().flush(); + if ((cnt++ % 100) == 0) { +// before clearing the session make sure that all added +// objects are also processed +// the extra while loop is needed because the export can +// recursively add new objects +exportAllToProcessObjects(true); + +OBDal.getInstance().getSession().clear(); } - firstRound = false; - dataScroller.close(); - dataScroller = null; } +// the remaining objects are always exported because they have been referenced +exportBecauseReferenced = true; -final List localToProcess = getToProcess(); -// reset the toProcess so that new objects are added to a new list -replaceToProcess(); -for (BaseOBObject bob : localToProcess) { - export(bob, !firstRound); - getOutput().flush(); -} -firstRound = false; +// get rid of the datascroller +dataScroller.close(); +dataScroller = null; } + + // handle the remaining toProcess objects + exportAllToProcessObjects(exportBecauseReferenced); + // reset mem replaceToProcess(); getAllToProcessObjects().clear(); @@ -263,6 +266,20 @@ } } + private void exportAllToProcessObjects(boolean exportBecauseReferenced) throws Exception { +boolean localExportBecauseReferenced = exportBecauseReferenced; +while (toProcess.size() > 0) { + final List localToProcess = getToProcess(); + // reset the toProcess so that new objects are added to a new list + replaceToProcess(); + for (BaseOBObject bob : localToProcess) { +export(bob, localExportBecauseReferenced); +getOutput().flush(); + } + localExportBecauseReferenced = true; +} + } + protected void export(BaseOBObject obObject, boolean isAddedBecauseReferenced) throws SAXException { final String entityName
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/725617e6a72e changeset: 5507:725617e6a72e user: Eduardo Argal Guibert openbravo.com> date: Mon Nov 30 10:40:26 2009 +0100 summary: Fixes bug 0011542: Unable to close a period in the fiscal calendar details: /erp/erp/devel/pi/rev/356060503cdc changeset: 5508:356060503cdc user: Eduardo Argal Guibert openbravo.com> date: Tue Dec 01 12:47:51 2009 +0100 summary: 0011570: Invoice payment monitor (both for sales and purchase) details: /erp/erp/devel/pi/rev/8e63d4c111b6 changeset: 5509:8e63d4c111b6 user: Eduardo Argal Guibert openbravo.com> date: Tue Dec 01 12:51:19 2009 +0100 summary: Fixes bug 0011314: uncorrected posting in payment status when conersion rates is used diffstat: src-db/database/model/functions/C_PERIOD_PROCESS.xml |8 +- src-db/database/model/tables/C_INVOICE.xml | 28 + src-db/database/sourcedata/AD_COLUMN.xml | 224 ++ src-db/database/sourcedata/AD_ELEMENT.xml | 78 + src-db/database/sourcedata/AD_FIELD.xml| 820 +- src-db/database/sourcedata/AD_FIELDGROUP.xml |9 + src-db/database/sourcedata/AD_MODEL_OBJECT.xml | 12 + src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml | 10 + src-db/database/sourcedata/AD_PROCESS.xml | 41 + src-db/database/sourcedata/AD_TEXTINTERFACES.xml | 33 + src/org/openbravo/erpCommon/ad_actionButton/InvoicePaymentMonitor.html | 209 ++ src/org/openbravo/erpCommon/ad_actionButton/InvoicePaymentMonitor.java | 170 ++ src/org/openbravo/erpCommon/ad_actionButton/InvoicePaymentMonitor.xml | 42 + src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java |6 +- src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java | 287 +++ src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java | 54 + 16 files changed, 1943 insertions(+), 88 deletions(-) diffs (truncated from 2968 to 300 lines): diff -r 239b3c493c53 -r 8e63d4c111b6 src-db/database/model/functions/C_PERIOD_PROCESS.xml --- a/src-db/database/model/functions/C_PERIOD_PROCESS.xml Mon Nov 30 19:28:27 2009 +0100 +++ b/src-db/database/model/functions/C_PERIOD_PROCESS.xml Tue Dec 01 12:51:19 2009 +0100 @@ -47,6 +47,7 @@ p_DocBaseType C_PeriodControl_Log.DocBaseType%TYPE; p_PeriodAction C_PeriodControl_Log.PeriodAction%TYPE; p_Processing C_PeriodControl_Log.Processing%TYPE; + v_AD_Client_ID C_PeriodControl_Log.AD_Client_ID%TYPE; BEGIN -- Update AD_PInstance @@ -61,8 +62,8 @@ FROM AD_PInstance WHERE AD_PInstance_ID=p_PInstance_ID; -SELECT AD_Org_ID, ISRecursive, C_Year_ID, PeriodNO, DocBaseType, PeriodAction, Processing -INTO p_Organization, p_IsRecursive, p_Year, p_PeriodNO, p_DocBaseType, p_PeriodAction, p_Processing +SELECT AD_Client_ID, AD_Org_ID, ISRecursive, C_Year_ID, PeriodNO, DocBaseType, PeriodAction, Processing +INTO v_AD_Client_ID, p_Organization, p_IsRecursive, p_Year, p_PeriodNO, p_DocBaseType, p_PeriodAction, p_Processing FROM C_PeriodControl_Log WHERE C_PeriodControl_Log_ID=v_Record_ID_Log; @@ -116,7 +117,8 @@ -- Action: Close if not permanently closed ELSIF(p_PeriodAction='C') THEN SELECT COUNT(DISTINCT C_YEAR.YEAR) INTO v_Count FROM C_PERIOD, C_PERIODCONTROL, C_YEAR WHERE - C_PERIODCONTROL.C_PERIOD_ID=C_PERIOD.C_PERIOD_ID AND C_PERIOD.C_YEAR_ID=C_YEAR.C_YEAR_ID AND C_PERIODCONTROL.PERIODSTATUS='O' AND C_YEAR.YEAR=1) THEN RAISE_APPLICATION_ERROR(-2, '@YearNotClose@'); END IF; diff -r 239b3c493c53 -r 8e63d4c111b6 src-db/database/model/tables/C_INVOICE.xml --- a/src-db/database/model/tables/C_INVOICE.xmlMon Nov 30 19:28:27 2009 +0100 +++ b/src-db/database/model/tables/C_INVOICE.xmlTue Dec 01 12:51:19 2009 +0100 @@ -209,6 +209,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 239b3c493c53 -r 8e63d4c111b6 src-db/database/sourcedata/AD_COLUMN.xml --- a/src-db/database/sourcedata/AD_COLUMN.xml Mon Nov 30 19:28:27 2009 +0100 +++ b/src-db/database/sourcedata/AD_COLUMN.xml Tue Dec 01 12:51:19 2009 +0100 @@ -246815,6 +246815,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -247926,6 +247957,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/a1313b5cacef changeset: 5483:a1313b5cacef user: Stefan Hühner openbravo.com> date: Mon Nov 23 12:05:37 2009 +0100 summary: Fixed 11458: Fix some broken sql code and remove lots of unsused xsqql methods. details: /erp/erp/devel/pi/rev/3c380d8b8c13 changeset: 5484:3c380d8b8c13 user: Stefan Hühner openbravo.com> date: Mon Nov 23 12:06:37 2009 +0100 summary: Merge details: /erp/erp/devel/pi/rev/b511acc7be36 changeset: 5485:b511acc7be36 user: Stefan Hühner openbravo.com> date: Mon Nov 23 12:07:40 2009 +0100 summary: Issue 11458: remove two more unused methods diffstat: src-db/database/model/tables/MA_PROCESSPLAN.xml|2 +- src-wad/src/org/openbravo/wad/Imports_data.xsql| 29 - src/org/openbravo/base/secureApp/Seguridad_data.xsql | 10 - src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java| 35 + src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html |6 +- src/org/openbravo/erpCommon/ad_actionButton/DropRegFactAcct_data.xsql | 12 +- src/org/openbravo/erpCommon/ad_actionButton/Test_In_data.xsql |4 +- src/org/openbravo/erpCommon/ad_forms/InitialClientSetup_data.xsql | 458 +--- src/org/openbravo/erpCommon/ad_forms/RemittanceCancel_data.xsql| 39 +- src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables_data.xsql| 19 +- src/org/openbravo/erpCommon/ad_help/DisplayHelp_Edit_data.xsql |4 +- src/org/openbravo/erpCommon/ad_process/AssetDelivery_data.xsql | 193 --- src/org/openbravo/erpCommon/ad_process/BPartner_data.xsql | 589 +- src/org/openbravo/erpCommon/utility/reporting/printing/Poc_data.xsql | 55 +- 14 files changed, 52 insertions(+), 1403 deletions(-) diffs (truncated from 1696 to 300 lines): diff -r e1df242e1210 -r b511acc7be36 src-db/database/model/tables/MA_PROCESSPLAN.xml --- a/src-db/database/model/tables/MA_PROCESSPLAN.xml Fri Nov 20 18:07:33 2009 +0100 +++ b/src-db/database/model/tables/MA_PROCESSPLAN.xml Mon Nov 23 12:07:40 2009 +0100 @@ -68,7 +68,7 @@ - + diff -r e1df242e1210 -r b511acc7be36 src-wad/src/org/openbravo/wad/Imports_data.xsql --- a/src-wad/src/org/openbravo/wad/Imports_data.xsql Fri Nov 20 18:07:33 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,30 +0,0 @@ - - - - - - - -Imports needed in the servlet, actually none (1=0) - - SELECT dummy as Name FROM DUAL WHERE 1=0 - - - diff -r e1df242e1210 -r b511acc7be36 src/org/openbravo/base/secureApp/Seguridad_data.xsql --- a/src/org/openbravo/base/secureApp/Seguridad_data.xsql Fri Nov 20 18:07:33 2009 +0100 +++ b/src/org/openbravo/base/secureApp/Seguridad_data.xsql Mon Nov 23 12:07:40 2009 +0100 @@ -44,10 +44,6 @@ - - - SELECT 1 FROM DUAL - @@ -58,12 +54,6 @@ - - - -SELECT 1 FROM DUAL - - diff -r e1df242e1210 -r b511acc7be36 src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java Fri Nov 20 18:07:33 2009 +0100 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java Mon Nov 23 12:07:40 2009 +0100 @@ -106,6 +106,8 @@ String strHaber = ""; String strImporte = ""; String strCBPartnerId_D = ""; +String spChars = ""; +boolean inpEvent = false; try { conn = getTransactionConnection(); CopyFromSettlementData[] data = CopyFromSettlementData.select(this, strKey); @@ -120,7 +122,30 @@ strCBPartnerId = ""; } strDate = vars.getStringParameter("inpDate" + data[i].cDebtPaymentId); +if (strDate.equals("")) { + myError = Utility.translateError(this, vars, vars.getLanguage(), + "The field DatePlanned is mandatory and cannot be left empty"); + return myError; +} strImporte = vars.getStringParameter("inpAmount" + data[i].cDebtPaymentId); +if (strImporte.equals("")) { + myError = Utility.translateError(this, vars, vars.getLanguage(), + "The field Amount is mandatory and cannot be left empty"); + return myError; +} +spChars = " `()\...@^&*+\"|:=,< >$-%/;'"; +int pos; +for (int a = 1; a <= 25; a++) { + pos = strImporte.indexOf(spChars.charAt(a)); + if (pos != -1) { +inpEvent = true; + } +} +if (inpEvent == true) { + myError = Utility.translateError(this, vars, vars.getLanguage(), + "The number is not correct.You may check the data"); + return myError; +} try { CopyFromSettlementData.insertDebtP
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/8716576fb365 changeset: 5409:8716576fb365 user: Asier Lostalé openbravo.com> date: Thu Nov 12 10:10:12 2009 +0100 summary: related to issue 11246: clean up FieldGroupLabelsData class details: /erp/erp/devel/pi/rev/25907e7d9ebe changeset: 5410:25907e7d9ebe user: Asier Lostalé openbravo.com> date: Thu Nov 12 10:31:21 2009 +0100 summary: fixed bug 11246: Proper field group tranlsation management details: /erp/erp/devel/pi/rev/6d034ef2c295 changeset: 5411:6d034ef2c295 user: Asier Lostalé openbravo.com> date: Thu Nov 12 10:47:55 2009 +0100 summary: related to issue 11246: clean up FieldGroupLabelsData class diffstat: src-core/src/org/openbravo/uiTranslation/FieldGroupLabelsData.java | 323 +++--- src-core/src/org/openbravo/uiTranslation/TranslationUtils.java | 21 +- 2 files changed, 98 insertions(+), 246 deletions(-) diffs (truncated from 402 to 300 lines): diff -r ed455230e288 -r 6d034ef2c295 src-core/src/org/openbravo/uiTranslation/FieldGroupLabelsData.java --- a/src-core/src/org/openbravo/uiTranslation/FieldGroupLabelsData.java Thu Nov 12 08:43:34 2009 +0100 +++ b/src-core/src/org/openbravo/uiTranslation/FieldGroupLabelsData.java Thu Nov 12 10:47:55 2009 +0100 @@ -40,70 +40,71 @@ } } + /** + * Obtains all field group labels for a tab in the specific language. If language is not found the + * base label is taken. + */ public static FieldGroupLabelsData[] selectFieldGroupTrl(ConnectionProvider connectionProvider, String ad_tab_id, String language) throws ServletException { -return selectFieldGroupTrl(connectionProvider, ad_tab_id, language, 0, 0); - } +StringBuffer strSql = new StringBuffer(); +strSql +.append("select t.name as tabName, fg.ad_fieldGroup_ID as fieldGroupId, fg.name as fieldGroupName, fg.name as fieldGroupTrlName"); +strSql.append("from ad_tab t,"); +strSql.append(" ad_field f,"); +strSql.append(" ad_fieldGroup fg,"); +strSql.append(" ad_module mg"); +strSql.append(" where t.ad_tab_id = ?"); +strSql.append(" and f.ad_tab_id = t.ad_tab_id"); +strSql.append(" and f.ad_fieldGroup_ID = fg.ad_fieldGroup_ID"); +strSql.append(" and mg.ad_module_id = fg.ad_module_id"); +strSql.append(" and mg.ad_language = ?"); +strSql.append(" union "); +strSql +.append(" select t.name as tabName, fg.ad_fieldGroup_ID, fg.name, coalesce(fgt.name, fg.name)"); +strSql.append("from ad_tab t,"); +strSql.append(" ad_field f,"); +strSql.append(" ad_module mg,"); +strSql.append(" ad_fieldGroup fg left join ad_fieldGroup_trl fgt "); +strSql.append("on fg.ad_fieldGroup_ID = fgt.ad_fieldGroup_ID"); +strSql.append(" and fgt.ad_language = ?"); +strSql.append(" where t.ad_tab_id = ?"); +strSql.append(" and f.ad_tab_id = t.ad_tab_id"); +strSql.append(" and f.ad_fieldGroup_ID = fg.ad_fieldGroup_ID"); +strSql.append(" and mg.ad_module_id = fg.ad_module_id"); +strSql.append(" and mg.ad_language != ?"); - public static FieldGroupLabelsData[] selectFieldGroupTrl(ConnectionProvider connectionProvider, - String ad_tab_id, String language, String keyValue, String keyName, int numberRegisters) - throws ServletException { -boolean existsKey = false; -String strSql = ""; -strSql = strSql -+ "select " -+ " tab.name as tabName" -+ " , fgroup.ad_fieldgroup_id as fieldGroupId " -+ " , fgroup.name as fieldGroupName" -+ " , fgroupTrl.name as fieldGroupTrlName" -+ "from " -+ " ad_tab tab " -+ " , ad_field field " -+ " , ad_fieldgroup fgroup " -+ " , ad_fieldgroup_trl fgroupTrl " -+ "where " -+ " tab.ad_tab_id = field.ad_tab_id " -+ " and field.ad_fieldgroup_id = fGroup.ad_fieldGroup_id " -+ " and tab.ad_tab_id = ? " -+ " and ((fgroup.ad_fieldgroup_id = fgroupTrl.ad_fieldgroup_id and fgroupTrl.ad_language = ? ) " -+ "or fgroupTrl.ad_fieldgroup_id is null) " -+ "UNION " -+ "select " -+ " tab.name as tabName" -+ ", fgroup.ad_fieldgroup_id " -+ ", fgroup.name " -+ ", fgroupTrl.name " -+ "from " -+ " ad_tab tab " -
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/584cfc61ece9 changeset: 5268:584cfc61ece9 user: Asier Lostalé openbravo.com> date: Tue Oct 20 10:03:19 2009 +0200 summary: issue 10302 When the license is expired only System Administrator is allowed to log into the application details: /erp/erp/devel/pi/rev/aad744f6a167 changeset: 5269:aad744f6a167 user: Asier Lostalé openbravo.com> date: Tue Oct 20 10:55:01 2009 +0200 summary: fixed bug 10302: Check also for expired licenses for module not to allow other roles than System to log in. details: /erp/erp/devel/pi/rev/30f0a601817e changeset: 5270:30f0a601817e user: Asier Lostalé openbravo.com> date: Tue Oct 20 10:55:35 2009 +0200 summary: merge diffstat: lib/README | 5 +- src-db/database/build.xml | 27 -- src-db/database/lib/dbsourcemanager.jar| src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml| 6 +- src-db/database/sourcedata/AD_MESSAGE.xml | 38 +- src/org/openbravo/base/secureApp/DefaultOptions_data.xsql | 30 +++- src/org/openbravo/base/secureApp/HttpSecureAppServlet.java | 72 - src/org/openbravo/base/secureApp/LoginHandler.java | 36 +++- src/org/openbravo/base/secureApp/Seguridad_data.xsql | 12 +++ src/org/openbravo/erpCommon/ad_forms/Role.java | 21 +- src/org/openbravo/erpCommon/ad_forms/RoleCombo_data.xsql | 17 - src/org/openbravo/erpCommon/obps/ActivationKey.java| 37 - 12 files changed, 229 insertions(+), 72 deletions(-) diffs (truncated from 576 to 300 lines): diff -r 2e8c4acab82b -r 30f0a601817e lib/README --- a/lib/READMEFri Oct 16 20:11:34 2009 +0200 +++ b/lib/READMETue Oct 20 10:55:35 2009 +0200 @@ -1,2 +1,3 @@ -When adding or removing libraries to Openbravo please update this page with your changes: -http://wiki.openbravo.com/wiki/Openbravo_ERP_2.50_Libraries \ No newline at end of file +When adding or removing libraries to Openbravo ERP please update this page +with your changes: +http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_Libraries diff -r 2e8c4acab82b -r 30f0a601817e src-db/database/build.xml --- a/src-db/database/build.xml Fri Oct 16 20:11:34 2009 +0200 +++ b/src-db/database/build.xml Tue Oct 20 10:55:35 2009 +0200 @@ -126,36 +126,9 @@ - - - - - - - - - - - - - - - - - - - - - - -UPDATE ad_system_info SET last_dbupdate=now() - - - - diff -r 2e8c4acab82b -r 30f0a601817e src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r 2e8c4acab82b -r 30f0a601817e src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml --- a/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Fri Oct 16 20:11:34 2009 +0200 +++ b/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Tue Oct 20 10:55:35 2009 +0200 @@ -95,13 +95,13 @@ + + + - - - diff -r 2e8c4acab82b -r 30f0a601817e src-db/database/sourcedata/AD_MESSAGE.xml --- a/src-db/database/sourcedata/AD_MESSAGE.xml Fri Oct 16 20:11:34 2009 +0200 +++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue Oct 20 10:55:35 2009 +0200 @@ -63656,6 +63656,17 @@ + + + + + + + + + + + @@ -63751,7 +63762,7 @@ - + @@ -64103,7 +64114,7 @@ - + @@ -64850,6 +64861,18 @@ + + + + + + + + + + + + @@ -65345,6 +65368,17 @@ + + + + + + + + + + + diff -r 2e8c4acab82b -r 30f0a601817e src/org/openbravo/base/secureApp/DefaultOptions_data.xsql --- a/src/org/openbravo/base/secureApp/DefaultOptions_data.xsql Fri Oct 16 20:11:34 2009 +0200 +++ b/src/org/openbravo/base/secureApp/DefaultOptions_data.xsql Tue Oct 20 10:55:35 2009 +0200 @@ -1,7 +1,7 @@
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/4b17055c5b60 changeset: 5264:4b17055c5b60 user: Antonio Moreno openbravo.com> date: Mon Oct 19 17:32:03 2009 +0200 summary: Fixed issue 11040. OnCreateDefaults should be removed when not in the XML files, on update.database. details: /erp/erp/devel/pi/rev/603b72820ebe changeset: 5265:603b72820ebe user: Antonio Moreno openbravo.com> date: Mon Oct 19 18:25:01 2009 +0200 summary: Fixed issue 11040. Indices will now be sorted before exporting them. details: /erp/erp/devel/pi/rev/f982fa88d064 changeset: 5266:f982fa88d064 user: Antonio Moreno openbravo.com> date: Mon Oct 19 18:26:09 2009 +0200 summary: Fixed issue 11041. Now export.database will continue if forced when a difference in a database file is found. diffstat: src-db/database/lib/dbsourcemanager.jar | src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diffs (22 lines): diff -r 4181fa90dd44 -r f982fa88d064 src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r 4181fa90dd44 -r f982fa88d064 src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml --- a/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Mon Oct 19 12:43:58 2009 +0200 +++ b/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Mon Oct 19 18:26:09 2009 +0200 @@ -95,13 +95,13 @@ + + + - - - -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/a2e93631b61d changeset: 5231:a2e93631b61d user: Stefan Hühner openbravo.com> date: Thu Oct 15 12:42:48 2009 +0200 summary: Issue 10878 Fix logic issue introduced in issue 7406, fixing behavior and improving the performance as originally intended. details: /erp/erp/devel/pi/rev/8654c9d09717 changeset: 5232:8654c9d09717 user: Stefan Hühner openbravo.com> date: Thu Oct 15 12:45:04 2009 +0200 summary: Issue 10878: Improve performance of manufacturing plan process Simplify view definition by eliminating unneeded join with ma_processplan_version details: /erp/erp/devel/pi/rev/8468978ce25d changeset: 5233:8468978ce25d user: Stefan Hühner openbravo.com> date: Thu Oct 15 12:46:11 2009 +0200 summary: Issue 10878: Improve performance of the Manufacturing Plan process Add some needed indices diffstat: src-db/database/model/functions/MRP_RUN_EXPLODE.xml | 2 +- src-db/database/model/tables/MA_PROCESSPLAN_VERSION.xml | 3 +++ src-db/database/model/tables/MA_SEQUENCE.xml | 3 +++ src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml | 4 src-db/database/model/tables/MA_WRPHASE.xml | 3 +++ src-db/database/model/tables/MA_WRPHASEPRODUCT.xml | 4 src-db/database/model/tables/MRP_RUN_PRODUCTIONLINE.xml | 7 +++ src-db/database/model/tables/MRP_RUN_PURCHASELINE.xml| 4 src-db/database/model/views/MA_PROCESSPLAN_TOTALIZED.xml | 14 +++--- 9 files changed, 36 insertions(+), 8 deletions(-) diffs (146 lines): diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/functions/MRP_RUN_EXPLODE.xml --- a/src-db/database/model/functions/MRP_RUN_EXPLODE.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/functions/MRP_RUN_EXPLODE.xml Thu Oct 15 12:46:11 2009 +0200 @@ -106,7 +106,7 @@ END IF; -- skip processing if product did not change from last row -if (v_lastProductID = Cur_Run_Lines.M_PRODUCT_ID) THEN +if (v_lastProductID <> Cur_Run_Lines.M_PRODUCT_ID) THEN v_ResultStr := 'Other dependant products'; FOR Cur_Parents IN (SELECT pt.PRODUCED diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MA_PROCESSPLAN_VERSION.xml --- a/src-db/database/model/tables/MA_PROCESSPLAN_VERSION.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MA_PROCESSPLAN_VERSION.xml Thu Oct 15 12:46:11 2009 +0200 @@ -58,6 +58,9 @@ + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MA_SEQUENCE.xml --- a/src-db/database/model/tables/MA_SEQUENCE.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MA_SEQUENCE.xml Thu Oct 15 12:46:11 2009 +0200 @@ -109,6 +109,9 @@ + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml --- a/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml Thu Oct 15 12:46:11 2009 +0200 @@ -95,6 +95,10 @@ + + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MA_WRPHASE.xml --- a/src-db/database/model/tables/MA_WRPHASE.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MA_WRPHASE.xml Thu Oct 15 12:46:11 2009 +0200 @@ -104,6 +104,9 @@ + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MA_WRPHASEPRODUCT.xml --- a/src-db/database/model/tables/MA_WRPHASEPRODUCT.xmlThu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MA_WRPHASEPRODUCT.xmlThu Oct 15 12:46:11 2009 +0200 @@ -87,6 +87,10 @@ + + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MRP_RUN_PRODUCTIONLINE.xml --- a/src-db/database/model/tables/MRP_RUN_PRODUCTIONLINE.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MRP_RUN_PRODUCTIONLINE.xml Thu Oct 15 12:46:11 2009 +0200 @@ -135,9 +135,16 @@ + + + + + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/tables/MRP_RUN_PURCHASELINE.xml --- a/src-db/database/model/tables/MRP_RUN_PURCHASELINE.xml Thu Oct 15 11:15:58 2009 +0200 +++ b/src-db/database/model/tables/MRP_RUN_PURCHASELINE.xml Thu Oct 15 12:46:11 2009 +0200 @@ -123,6 +123,10 @@ + + + + diff -r 55de7d8ce46e -r 8468978ce25d src-db/database/model/views/MA_PROCESSPLAN_TOTALIZED.xml --- a/src
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/84881e6a630b changeset: 4982:84881e6a630b user: Martin Taal openbravo.com> date: Sun Sep 20 23:26:17 2009 +0200 summary: Updated test as DalUtil.copy method has been improved details: /erp/erp/devel/pi/rev/86b8d5646051 changeset: 4983:86b8d5646051 user: Martin Taal openbravo.com> date: Sun Sep 20 23:27:13 2009 +0200 summary: Moved getValidUser method to LoginUtils details: /erp/erp/devel/pi/rev/ee21ebad99ab changeset: 4984:ee21ebad99ab user: Martin Taal openbravo.com> date: Sun Sep 20 23:27:40 2009 +0200 summary: Made static final public diffstat: src-test/org/openbravo/test/xml/EntityXMLImportTestBusinessObject.java | 9 +- src/org/openbravo/base/secureApp/LoginUtils.java | 41 src/org/openbravo/dal/core/OBContext.java | 2 +- src/org/openbravo/service/web/BaseWebServiceServlet.java | 30 +- 4 files changed, 48 insertions(+), 34 deletions(-) diffs (162 lines): diff -r 0cb8bcc607d0 -r ee21ebad99ab src-test/org/openbravo/test/xml/EntityXMLImportTestBusinessObject.java --- a/src-test/org/openbravo/test/xml/EntityXMLImportTestBusinessObject.java Fri Sep 18 17:01:18 2009 +0200 +++ b/src-test/org/openbravo/test/xml/EntityXMLImportTestBusinessObject.java Sun Sep 20 23:27:40 2009 +0200 @@ -277,13 +277,10 @@ fail(ir.getException().getMessage()); } -assertEquals(NO_OF_PT + NO_OF_PT_LINE, ir.getInsertedObjects().size()); -assertEquals(NO_OF_PT, ir.getUpdatedObjects().size()); -for (final Object o : ir.getUpdatedObjects()) { - assertTrue(o instanceof PaymentTermTrl); -} +assertEquals(NO_OF_PT + NO_OF_PT_LINE + 1, ir.getInsertedObjects().size()); for (final Object o : ir.getInsertedObjects()) { - assertTrue(o instanceof PaymentTerm || o instanceof PaymentTermLine); + assertTrue(o instanceof PaymentTermTrl || o instanceof PaymentTerm + || o instanceof PaymentTermLine); } } diff -r 0cb8bcc607d0 -r ee21ebad99ab src/org/openbravo/base/secureApp/LoginUtils.java --- a/src/org/openbravo/base/secureApp/LoginUtils.java Fri Sep 18 17:01:18 2009 +0200 +++ b/src/org/openbravo/base/secureApp/LoginUtils.java Sun Sep 20 23:27:40 2009 +0200 @@ -11,13 +11,21 @@ */ package org.openbravo.base.secureApp; +import java.util.List; + import javax.servlet.ServletException; import org.apache.log4j.Logger; +import org.hibernate.Query; +import org.openbravo.base.exception.OBException; import org.openbravo.base.exception.OBSecurityException; +import org.openbravo.base.util.Check; import org.openbravo.dal.core.OBContext; +import org.openbravo.dal.core.SessionHandler; import org.openbravo.database.ConnectionProvider; import org.openbravo.erpCommon.utility.Utility; +import org.openbravo.model.ad.access.User; +import org.openbravo.utils.CryptoSHA1BASE64; public class LoginUtils { @@ -27,6 +35,39 @@ private LoginUtils() { } + /** + * Returns a userId which matches the login and password. If no user is found then null is + * returned. The combination of login and password is used to find the user. + * + * Note that only active users are returned. + * + * @param login + * the login + * @param password + * the password + * @return the user id or null if no user could be found. + */ + public static String getValidUserId(String login, String password) { +try { + final String encodedPwd = CryptoSHA1BASE64.hash(password); + // now search with the login and password + final Query qry = SessionHandler.getInstance().createQuery( + "select id from " + User.class.getName() + + " where username=? and password=? and active=true"); + qry.setParameter(0, login); + qry.setParameter(1, encodedPwd); + final List list = qry.list(); + Check.isTrue(list.size() == 0 || list.size() == 1, "Zero or one user expected for login " + + login + " but found " + list.size() + " users "); + if (list.size() == 0) { +return null; + } + return (String) list.get(0); +} catch (final Exception e) { + throw new OBException(e); +} + } + public static boolean fillSessionArguments(ConnectionProvider conn, VariablesSecureApp vars, String strUserAuth, String strLanguage, String strIsRTL, String strRol, String strCliente, String strOrg, String strAlmacen) throws ServletException { diff -r 0cb8bcc607d0 -r ee21ebad99ab src/org/openbravo/dal/core/OBContext.java --- a/src/org/openbravo/dal/core/OBContext.java Fri Sep 18 17:01:18 2009 +0200 +++ b/src/org/openbravo/dal/core/OBContext.java Sun Sep 20 23:27:40 2009 +0200 @@ -80,7 +80,7 @@ private static ThreadLocal adminModeSet = new ThreadLocal(); - private static String CONTEXT_PARAM = "#OBContext"; + public static String CONTEXT_PARAM = "#OBContext"; private static OBContext adminContext = nu
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/6215f75e0411 changeset: 4979:6215f75e0411 user: Antonio Moreno openbravo.com> date: Fri Sep 18 12:28:52 2009 +0200 summary: Removed unnecessary try/finally block details: /erp/erp/devel/pi/rev/8a48ae095213 changeset: 4980:8a48ae095213 user: Antonio Moreno openbravo.com> date: Fri Sep 18 12:44:02 2009 +0200 summary: Slightly changed two dbsm messages. details: /erp/erp/devel/pi/rev/0cb8bcc607d0 changeset: 4981:0cb8bcc607d0 user: Antonio Moreno openbravo.com> date: Fri Sep 18 17:01:18 2009 +0200 summary: Restored correct version of AD_PROCESS_REQUEST data diffstat: src-db/database/lib/dbsourcemanager.jar | src-db/database/sourcedata/referencedData/AD_PROCESS_REQUEST.xml | 43 ++- src/org/openbravo/erpCommon/info/ImageInfoBLOB.java | 39 - 3 files changed, 59 insertions(+), 23 deletions(-) diffs (128 lines): diff -r 66ffba621c7d -r 0cb8bcc607d0 src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r 66ffba621c7d -r 0cb8bcc607d0 src-db/database/sourcedata/referencedData/AD_PROCESS_REQUEST.xml --- a/src-db/database/sourcedata/referencedData/AD_PROCESS_REQUEST.xml Fri Sep 18 15:03:24 2009 +0200 +++ b/src-db/database/sourcedata/referencedData/AD_PROCESS_REQUEST.xml Fri Sep 18 17:01:18 2009 +0200 @@ -13,6 +13,19 @@ + + + + + + + + + + + + + @@ -26,6 +39,19 @@ + + + + + + + + + + + + + @@ -39,6 +65,19 @@ + + + + + + + + + + + + + @@ -49,8 +88,8 @@ - - + + diff -r 66ffba621c7d -r 0cb8bcc607d0 src/org/openbravo/erpCommon/info/ImageInfoBLOB.java --- a/src/org/openbravo/erpCommon/info/ImageInfoBLOB.java Fri Sep 18 15:03:24 2009 +0200 +++ b/src/org/openbravo/erpCommon/info/ImageInfoBLOB.java Fri Sep 18 17:01:18 2009 +0200 @@ -73,30 +73,27 @@ printPageFrame(response, vars, imageID, tableId, columnName, parentObjectId); } else if (vars.commandIn("SAVE")) { - try { -final FileItem fi = vars.getMultiFile("inpFile"); -byte[] bytea = fi.get(); + final FileItem fi = vars.getMultiFile("inpFile"); + byte[] bytea = fi.get(); -// Using DAL to write the image data to the database -Image image; -if (imageID == null || imageID.equals("")) { - image = OBProvider.getInstance().get(Image.class); - image.setBindaryData(bytea); - image.setActive(true); - image.setName("Image"); - OBDal.getInstance().save(image); - OBDal.getInstance().flush(); + // Using DAL to write the image data to the database + Image image; + if (imageID == null || imageID.equals("")) { +image = OBProvider.getInstance().get(Image.class); +image.setBindaryData(bytea); +image.setActive(true); +image.setName("Image"); +OBDal.getInstance().save(image); +OBDal.getInstance().flush(); -} else { - image = OBDal.getInstance().get(Image.class, imageID); - image.setActive(true); - image.setBindaryData(bytea); - OBDal.getInstance().flush(); -} -PrintWriter writer = response.getWriter(); -writeRedirect(writer, image.getId(), columnName); - } finally { + } else { +image = OBDal.getInstance().get(Image.class, imageID); +image.setActive(true); +image.setBindaryData(bytea); +OBDal.getInstance().flush(); } + PrintWriter writer = response.getWriter(); + writeRedirect(writer, image.getId(), columnName); } else if (vars.commandIn("DELETE")) { if (imageID != null && !imageID.equals("")) { boolean adminMode = OBContext.getOBContext().setInAdministratorMode(true); -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] erp/devel/pi: 3 new changesets
details: /erp/erp/devel/pi/rev/8590d970734e changeset: 4954:8590d970734e user: Antonio Moreno openbravo.com> date: Thu Sep 17 11:33:22 2009 +0200 summary: Fixed issue 10604. API change is wrong. Reverting it. details: /erp/erp/devel/pi/rev/bed5e93f8911 changeset: 4955:bed5e93f8911 user: Antonio Moreno openbravo.com> date: Thu Sep 17 12:31:11 2009 +0200 summary: Fixed issue 0010642. Spanish shouldn't be system language. details: /erp/erp/devel/pi/rev/e9b85b675ab9 changeset: 4956:e9b85b675ab9 user: Antonio Moreno openbravo.com> date: Thu Sep 17 12:36:37 2009 +0200 summary: [img] Fixed small issues with image reference. diffstat: src-db/database/model/tables/AD_WINDOW.xml | 2 +- src-db/database/sourcedata/referencedData/AD_LANGUAGE.xml| 2 +- src-wad/src/org/openbravo/wad/WadUtility.java| 3 +- src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.html | 2 +- src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.xml | 2 +- src/org/openbravo/erpCommon/info/ImageInfoBLOB.html | 11 +- src/org/openbravo/erpCommon/info/ImageInfoBLOB.java | 64 +--- src/org/openbravo/erpCommon/utility/ImageToDatabaseLoader.java | 1 - src/org/openbravo/erpCommon/utility/ShowImage.java | 52 +- 9 files changed, 61 insertions(+), 78 deletions(-) diffs (275 lines): diff -r 5308f2ed4b1c -r e9b85b675ab9 src-db/database/model/tables/AD_WINDOW.xml --- a/src-db/database/model/tables/AD_WINDOW.xmlThu Sep 17 12:11:29 2009 +0200 +++ b/src-db/database/model/tables/AD_WINDOW.xmlThu Sep 17 12:36:37 2009 +0200 @@ -72,7 +72,7 @@ - + diff -r 5308f2ed4b1c -r e9b85b675ab9 src-db/database/sourcedata/referencedData/AD_LANGUAGE.xml --- a/src-db/database/sourcedata/referencedData/AD_LANGUAGE.xml Thu Sep 17 12:11:29 2009 +0200 +++ b/src-db/database/sourcedata/referencedData/AD_LANGUAGE.xml Thu Sep 17 12:36:37 2009 +0200 @@ -610,7 +610,7 @@ - + diff -r 5308f2ed4b1c -r e9b85b675ab9 src-wad/src/org/openbravo/wad/WadUtility.java --- a/src-wad/src/org/openbravo/wad/WadUtility.java Thu Sep 17 12:11:29 2009 +0200 +++ b/src-wad/src/org/openbravo/wad/WadUtility.java Thu Sep 17 12:36:37 2009 +0200 @@ -2197,8 +2197,7 @@ return false; return reference.equals("21") || reference.equals("25") || reference.equals("30") || reference.equals("31") || reference.equals("32") || reference.equals("35") -|| reference.equals("800013") || reference.equals("800011") -/* || reference.equals("4AA6C3BE9D3B4D84A3B80489505A23E5") */; +|| reference.equals("800013") || reference.equals("800011"); } public static boolean isLinkType(String reference) { diff -r 5308f2ed4b1c -r e9b85b675ab9 src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.html --- a/src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.html Thu Sep 17 12:11:29 2009 +0200 +++ b/src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.html Thu Sep 17 12:36:37 2009 +0200 @@ -12,7 +12,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL - * All portions are Copyright (C) 2001-2008 Openbravo SL + * All portions are Copyright (C) 2001-2009 Openbravo SL * All Rights Reserved. * Contributor(s): __. diff -r 5308f2ed4b1c -r e9b85b675ab9 src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.xml --- a/src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.xml Thu Sep 17 12:11:29 2009 +0200 +++ b/src-wad/src/org/openbravo/wad/controls/WADImageJSValidation.xml Thu Sep 17 12:36:37 2009 +0200 @@ -12,7 +12,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL - * All portions are Copyright (C) 2001-2006 Openbravo SL + * All portions are Copyright (C) 2001-2009 Openbravo SL * All Rights Reserved. * Contributor(s): __. diff -r 5308f2ed4b1c -r e9b85b675ab9 src/org/openbravo/erpCommon/info/ImageInfoBLOB.html --- a/src/org/openbravo/erpCommon/info/ImageInfoBLOB.html Thu Sep 17 12:11:29 2009 +0200 +++ b/src/org/openbravo/erpCommon/info/ImageInfoBLOB.html Thu Sep 17 12:36:37 2009 +0200 @@ -34,7 +34,6 @@ - @@ -59,16 +58,16 @@