details:   https://code.openbravo.com/erp/stable/2.50/rev/f58875823cea
changeset: 9779:f58875823cea
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Tue Jan 10 18:01:05 2012 +0100
summary:   Fixes issue 0019451: 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 68d0babe99f3 -r f58875823cea src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jan 10 17:56:58 2012 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jan 10 18:01:05 2012 +0100
@@ -30806,6 +30806,17 @@
 <!--362A076A272B4284ADDCAE947DC473FB-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--362A076A272B4284ADDCAE947DC473FB--></AD_MESSAGE>
 
+<!--36306BEE0B0148608FDD36FEDD5E1135--><AD_MESSAGE>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  
<AD_MESSAGE_ID><![CDATA[36306BEE0B0148608FDD36FEDD5E1135]]></AD_MESSAGE_ID>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  <VALUE><![CDATA[OrgIsReady]]></VALUE>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  <MSGTEXT><![CDATA[The organization 
can not be moved because it is set as ready]]></MSGTEXT>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--36306BEE0B0148608FDD36FEDD5E1135-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--36306BEE0B0148608FDD36FEDD5E1135--></AD_MESSAGE>
+
 <!--37B25D3CE4344D7CA0E2452CEE985BAF--><AD_MESSAGE>
 <!--37B25D3CE4344D7CA0E2452CEE985BAF-->  
<AD_MESSAGE_ID><![CDATA[37B25D3CE4344D7CA0E2452CEE985BAF]]></AD_MESSAGE_ID>
 <!--37B25D3CE4344D7CA0E2452CEE985BAF-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 68d0babe99f3 -r f58875823cea 
src/org/openbravo/erpCommon/utility/WindowTreeChecks.java
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecks.java Tue Jan 10 
17:56:58 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTreeChecks.java Tue Jan 10 
18:01:05 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-2009 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 68d0babe99f3 -r f58875823cea 
src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
--- a/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql  Tue Jan 10 
17:56:58 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql  Tue Jan 10 
18:01:05 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-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -394,6 +394,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