New table whose name ends in "Line" and does not have a Header table
Description
The steps to reproduce the error are: 1. Create a new Table: LUY_ProductLine 2. Add new column LUY_ProductLine_ID to table M_Product 3. Add new field for LUY_ProductLine_ID column in Products window 4. When opening the Products window the following error occurs:
20:20:45.460===========> GridFieldVO.loadLookupInfo: No LookupInfo for LUY_ProductLine_ID [42] java.lang.NullPointerException at org.compiere.util.DB.isSOTrx(DB.java:1752) at org.compiere.util.Env.getZoomWindowID(Env.java:2035) at org.compiere.model.MLookupFactory.getLookup_Table(MLookupFactory.java:607) at org.compiere.model.MLookupFactory.getLookupInfo(MLookupFactory.java:201) at org.compiere.model.GridFieldVO.loadLookupInfo(GridFieldVO.java:853) at org.compiere.model.GridFieldVO.initFinish(GridFieldVO.java:842) at org.compiere.model.GridFieldVO.afterCreate(GridFieldVO.java:202) at org.compiere.model.GridTabVO.createFields(GridTabVO.java:355) at org.compiere.model.GridTabVO.getFields(GridTabVO.java:556) at org.compiere.model.GridTab.loadFields(GridTab.java:366) at org.compiere.model.GridTab.loadTab(GridTab.java:312) at org.compiere.model.GridTab.initTab(GridTab.java:303) at org.compiere.model.GridWindow.initTab(GridWindow.java:195)
The problem occurs in line 1752 of the class: org.compiere.util.DB.java
if (MTable.get (Env.getCtx (), hdr) .getColumn ("IsSOTrx") == null) {
The steps to reproduce the error are:
1. Create a new Table: LUY_ProductLine
2. Add new column LUY_ProductLine_ID to table M_Product
3. Add new field for LUY_ProductLine_ID column in Products window
4. When opening the Products window the following error occurs:
20:20:45.460===========> GridFieldVO.loadLookupInfo: No LookupInfo for LUY_ProductLine_ID [42]
java.lang.NullPointerException
at org.compiere.util.DB.isSOTrx(DB.java:1752)
at org.compiere.util.Env.getZoomWindowID(Env.java:2035)
at org.compiere.model.MLookupFactory.getLookup_Table(MLookupFactory.java:607)
at org.compiere.model.MLookupFactory.getLookupInfo(MLookupFactory.java:201)
at org.compiere.model.GridFieldVO.loadLookupInfo(GridFieldVO.java:853)
at org.compiere.model.GridFieldVO.initFinish(GridFieldVO.java:842)
at org.compiere.model.GridFieldVO.afterCreate(GridFieldVO.java:202)
at org.compiere.model.GridTabVO.createFields(GridTabVO.java:355)
at org.compiere.model.GridTabVO.getFields(GridTabVO.java:556)
at org.compiere.model.GridTab.loadFields(GridTab.java:366)
at org.compiere.model.GridTab.loadTab(GridTab.java:312)
at org.compiere.model.GridTab.initTab(GridTab.java:303)
at org.compiere.model.GridWindow.initTab(GridWindow.java:195)
The problem occurs in line 1752 of the class: org.compiere.util.DB.java
if (MTable.get (Env.getCtx (), hdr) .getColumn ("IsSOTrx") == null) {
It could be solved with the following code:
if (MTable.get (Env.getCtx (), hdr)! = null) {
if (MTable.get (Env.getCtx (), hdr) .getColumn ("IsSOTrx") == null) {
.......................
}
}
else {
noIsSOTrxColumn = true;
}
...............