Menu

#2600 Export Format Generator give version null value error

Core
open-fixed
5
2011-04-14
2011-04-14
KittiU
No

Steps to Error:
1. Run Export Format Generator process
2. Select any window, i.e., Greeting
3. Don't check any checkbox, click OK to generate
4. Error message shown that version is null while is it mandatory.

But if I check "Include only the tab that create record" checkbox, there will be no error.

The error occur on the method, createFormatLine, as the version is not set. I am not sure this is intentional or not, but the patch is as following.

Kitti U.

Discussion

  • KittiU

    KittiU - 2011-04-14

    ### Eclipse Workspace Patch 1.0
    #P adempiere360lts
    Index: base/src/org/eevolution/process/ExportFormatGenerator.java
    ===================================================================
    --- base/src/org/eevolution/process/ExportFormatGenerator.java (revision 14491)
    +++ base/src/org/eevolution/process/ExportFormatGenerator.java (working copy)
    @@ -233,6 +233,7 @@
    referenceFormat.setAD_Table_ID(MTable.getTable_ID(m_parent_table));
    referenceFormat.setDescription(table.getDescription());
    referenceFormat.setHelp(table.getHelp());
    + referenceFormat.setVersion(version);
    referenceFormat.saveEx();

    int AD_Column_ID=DB.getSQLValue(get_TrxName(), "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=(SELECT AD_Table_ID FROM AD_Table WHERE TableName=?) AND UPPER(ColumnName)='DOCUMENTNO'",m_parent_table);

     
  • KittiU

    KittiU - 2011-04-14
    • status: open --> open-fixed
     
  • KittiU

    KittiU - 2011-04-14
    • assigned_to: trifonnt --> vpj-cd
     
  • KittiU

    KittiU - 2011-04-14

    Another bug found, after the first one was resolved. The index out of bound error when try to generate export format for Product window.

    Following is the final patch

    =============================================================

    ### Eclipse Workspace Patch 1.0
    #P adempiere360lts
    Index: base/src/org/eevolution/process/ExportFormatGenerator.java
    ===================================================================
    --- base/src/org/eevolution/process/ExportFormatGenerator.java (revision 14491)
    +++ base/src/org/eevolution/process/ExportFormatGenerator.java (working copy)
    @@ -233,6 +233,9 @@
    referenceFormat.setAD_Table_ID(MTable.getTable_ID(m_parent_table));
    referenceFormat.setDescription(table.getDescription());
    referenceFormat.setHelp(table.getHelp());
    + // KTU BUG: 3286361
    + referenceFormat.setVersion(version);
    + // KTU
    referenceFormat.saveEx();

    int AD_Column_ID=DB.getSQLValue(get_TrxName(), "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=(SELECT AD_Table_ID FROM AD_Table WHERE TableName=?) AND UPPER(ColumnName)='DOCUMENTNO'",m_parent_table);
    @@ -325,8 +328,11 @@
    && DisplayType.Image
    != col.getAD_Reference_ID())
    {
    -
    - String tableName = col.getColumnName().substring(0, col.getColumnName().lastIndexOf("_ID"));
    + // KTU BUG
    + //String tableName = col.getColumnName().substring(0, col.getColumnName().lastIndexOf("_ID"));
    + String tableName = col.getColumnName().lastIndexOf("_ID") == -1 ? null
    + : col.getColumnName().substring(0, col.getColumnName().lastIndexOf("_ID"));
    + // KTU BUG 3286361
    log.info("Table Name:"+tableName);

    if(tableName==null)

     
  • KittiU

    KittiU - 2011-04-15
     

Log in to post a comment.