details:   https://code.openbravo.com/erp/devel/pi/rev/1d3a130a7d50
changeset: 15096:1d3a130a7d50
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Tue Jan 10 16:45:51 2012 +0100
summary:   Fixes issue 0019233: It does not appear an exception message on pop 
up
organization tree

diffstat:

 src-db/database/sourcedata/AD_MESSAGE.xml                 |  11 +++++++++++
 src/org/openbravo/erpCommon/utility/WindowTreeChecks.java |   5 ++++-
 src/org/openbravo/erpCommon/utility/WindowTree_data.xsql  |  11 ++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)

diffs (71 lines):

diff -r db490a229ff1 -r 1d3a130a7d50 src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jan 10 15:45:26 2012 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jan 10 16:45:51 2012 +0100
@@ -19029,6 +19029,17 @@
 <!--D64F38CA9A024B87B7D159F0EB4962D2-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D64F38CA9A024B87B7D159F0EB4962D2--></AD_MESSAGE>
 
+<!--D6A88AAAF4E04AE9860E20A87B015199--><AD_MESSAGE>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  
<AD_MESSAGE_ID><![CDATA[D6A88AAAF4E04AE9860E20A87B015199]]></AD_MESSAGE_ID>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  <VALUE><![CDATA[OrgIsReady]]></VALUE>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  <MSGTEXT><![CDATA[The organization 
can not be moved because it is set as ready]]></MSGTEXT>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--D6A88AAAF4E04AE9860E20A87B015199-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D6A88AAAF4E04AE9860E20A87B015199--></AD_MESSAGE>
+
 <!--D6F0D703B42242109E932570B7C61765--><AD_MESSAGE>
 <!--D6F0D703B42242109E932570B7C61765-->  
<AD_MESSAGE_ID><![CDATA[D6F0D703B42242109E932570B7C61765]]></AD_MESSAGE_ID>
 <!--D6F0D703B42242109E932570B7C61765-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r db490a229ff1 -r 1d3a130a7d50 
src/org/openbravo/erpCommon/utility/WindowTreeChecks.java
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecks.java Tue Jan 10 
15:45:26 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTreeChecks.java Tue Jan 10 
16:45:51 2012 +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-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -60,6 +60,9 @@
       String table = WindowTreeData.selectTableName(conn, tabId);
       String key = WindowTreeData.selectKey(conn, tabId);
       String TreeType = WindowTreeUtility.getTreeType(key);
+      String isReady = WindowTreeData.selectIsReady(conn, nodeId);
+      if ("Y".equals(isReady))
+        return Utility.messageBD(conn, "OrgIsReady", vars.getLanguage());
       if (isChild && !topNodeId.equals("0")
           && WindowTreeChecksData.selectIsSummary(conn, table, key, 
topNodeId).equals("N"))
         return Utility.messageBD(conn, "NotIsSummary", vars.getLanguage());
diff -r db490a229ff1 -r 1d3a130a7d50 
src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
--- a/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql  Tue Jan 10 
15:45:26 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql  Tue Jan 10 
16:45:51 2012 +0100
@@ -12,7 +12,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-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -318,6 +318,15 @@
       </Sql>
         <Parameter name="adTabId"/>
    </SqlMethod>
+   <SqlMethod name="selectIsReady" type="preparedStatement" return="String" 
default="N">
+      <SqlMethodComment></SqlMethodComment>
+      <Sql>
+        SELECT ISREADY
+        FROM AD_ORG
+        WHERE AD_ORG_ID = ?
+      </Sql>
+        <Parameter name="adOrgId"/>
+   </SqlMethod>
    <SqlMethod name="update" type="preparedStatement" return="rowCount">
       <SqlMethodComment></SqlMethodComment>
       <Sql>

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to