随笔 - 6  文章 - 129  trackbacks - 0
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 821380
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

Tree Icon

It is a known issue that the tree icon in the teams window does not work. If it is clicked it throws an error. Openbravo ERP does not support trees on modules yet. Still, the module has been designed to provide a mean to workaround this issue. As for that, some java files needs to be modified and the application recompiled to make the changes visible. Take into account that this is a core modification (and core modifications should not be done). If a core modification is done, whenever the system is updated with the next maintenaince pack, the changes will be lost (you will have to remember to do them again after updating the system).

Making this changes will make the tree icon work and so, the drag and drop functionality will be usable. The changes consist on adding the following lines in the following files:

  • src/org/openbravo/erpCommon/utility/WindowTreeChecks.java - Line 132
   } else if (TreeType.equals("HCMC_TE")) {

result = "";

  • src/org/openbravo/erpCommon/utility/WindowTreeUtility.java - Line 73
   else if (keyColumnName.equals("Hcmc_Team_ID"))

TreeType = "HCMC_TE";

  • src/org/openbravo/erpCommon/utility/WindowTreeUtility.java - Line 155
   else if (TreeType.equals("HCMC_TE"))

data = WindowTreeData.selectTeam(conn, vars.getUser(), strEditable, strParentID, strNodeId,

TreeID);

  • src/org/openbravo/erpCommon/utility/WindowTree_data.xsql - Line 290
  <SqlMethod name="selectTeam" type="preparedStatement" return="multiple">

<SqlMethodComment></SqlMethodComment>

<Sql>

SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive, te.HCMC_TEAM_ID AS ID, te.NAME, ' ' AS Description,te.IsSummary

FROM AD_TREENODE tn LEFT JOIN AD_TREEBAR tb ON tn.AD_Tree_ID=tb.AD_Tree_ID

AND tn.Node_ID=tb.Node_ID

AND tb.AD_User_ID = ? ,

HCMC_TEAM te

WHERE tn.Node_ID = te.HCMC_TEAM_ID

AND tn.AD_Tree_ID = ?

ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo

</Sql>

<Parameter name="adUserId"/>

<Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND te.isActive='Y' AND "/>

<Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>

<Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>

<Parameter name="adTreeId"/>

</SqlMethod>

Notice that the line number above may change over time. Notice that this lines should be eliminated manually if the module is unistalled.


Add Team Manager 

org.openbravo.hcm.common.ad_process.HCMC_addmanager_process.java

      final Calendar today = Calendar.getInstance();
      final SimpleDateFormat sdf = new SimpleDateFormat();
      sdf.applyPattern(bundle.getContext().getJavaDateFormat());

      final Date effectiveFrom = sdf.parse(strEffectiveFrom);
      final Date effectiveTo = ((strEffectiveTo != null && strEffectiveTo != "") ? sdf
          .parse(strEffectiveTo) : null);






posted on 2011-02-11 16:26 Ke 阅读(338) 评论(0)  编辑  收藏 所属分类: Openbravo

只有注册用户登录后才能发表评论。


网站导航: