IDEMPIERE-78 Error using tables terminated in TO
This commit is contained in:
parent
083b9dfc49
commit
ebb3dec44e
|
@ -510,7 +510,10 @@ public class GridFieldVO implements Serializable
|
||||||
lookupInfo = MLookupFactory.getLookupInfo (ctx, WindowNo, AD_Column_ID, displayType,
|
lookupInfo = MLookupFactory.getLookupInfo (ctx, WindowNo, AD_Column_ID, displayType,
|
||||||
Env.getLanguage(ctx), ColumnName, AD_Reference_Value_ID,
|
Env.getLanguage(ctx), ColumnName, AD_Reference_Value_ID,
|
||||||
IsParent, ValidationCode);
|
IsParent, ValidationCode);
|
||||||
lookupInfo.InfoFactoryClass = this.InfoFactoryClass;
|
if (lookupInfo == null)
|
||||||
|
displayType = DisplayType.ID;
|
||||||
|
else
|
||||||
|
lookupInfo.InfoFactoryClass = this.InfoFactoryClass;
|
||||||
}
|
}
|
||||||
catch (Exception e) // Cannot create Lookup
|
catch (Exception e) // Cannot create Lookup
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,20 +243,19 @@ public class MQuery implements Serializable
|
||||||
return "C_DocType_ID";
|
return "C_DocType_ID";
|
||||||
if (columnName.equals("Bill_BPartner_ID"))
|
if (columnName.equals("Bill_BPartner_ID"))
|
||||||
return "C_BPartner_ID";
|
return "C_BPartner_ID";
|
||||||
if (columnName.equals("Bill_Location_ID"))
|
if (columnName.equals("Bill_Location_ID") || columnName.equals("BillTo_ID"))
|
||||||
return "C_BPartner_Location_ID";
|
return "C_BPartner_Location_ID";
|
||||||
if (columnName.equals("Account_ID"))
|
if (columnName.equals("Account_ID"))
|
||||||
return "C_ElementValue_ID";
|
return "C_ElementValue_ID";
|
||||||
if (columnName.equals("C_LocFrom_ID") || columnName.equals("C_LocTo_ID"))
|
if (columnName.equals("C_LocFrom_ID") || columnName.equals("C_LocTo_ID"))
|
||||||
return "C_Location_ID";
|
return "C_Location_ID";
|
||||||
// Fix "*_To" columns
|
if (columnName.equals("C_UOM_To_ID"))
|
||||||
if (columnName.toUpperCase().endsWith("TO_ID")) {
|
return "C_UOM";
|
||||||
return columnName.substring(0, columnName.length()-5)+"_ID";
|
if (columnName.equals("M_AttributeSetInstanceTo_ID"))
|
||||||
}
|
return "M_AttributeSetInstance";
|
||||||
if (columnName.toUpperCase().endsWith("_TO_ID")) {
|
if (columnName.equals("M_LocatorTo_ID"))
|
||||||
return columnName.substring(0, columnName.length()-6)+"_ID";
|
return "M_Locator";
|
||||||
}
|
if (columnName.equals("AD_OrgBP_ID") || columnName.equals("AD_OrgTrx_ID") || columnName.equals("AD_OrgTo_ID"))
|
||||||
if (columnName.equals("AD_OrgBP_ID") || columnName.equals("AD_OrgTrx_ID"))
|
|
||||||
return "AD_Org_ID";
|
return "AD_Org_ID";
|
||||||
// See also GridTab.validateQuery
|
// See also GridTab.validateQuery
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue