[ 1837219 ] User Defined Elements - Unknown TreeType=U1
This commit is contained in:
parent
0f970af92c
commit
eee1cee0d5
|
@ -224,7 +224,14 @@ public class MElementValue extends X_C_ElementValue
|
||||||
protected boolean afterSave (boolean newRecord, boolean success)
|
protected boolean afterSave (boolean newRecord, boolean success)
|
||||||
{
|
{
|
||||||
if (newRecord)
|
if (newRecord)
|
||||||
insert_Tree(MTree_Base.TREETYPE_ElementValue, getC_Element_ID());
|
{
|
||||||
|
// afalcone [Bugs #1837219]
|
||||||
|
int ad_Tree_ID= (new MElement(getCtx(), getC_Element_ID(), null)).getAD_Tree_ID();
|
||||||
|
String treeType= (new MTree(getCtx(),ad_Tree_ID,null)).getTreeType();
|
||||||
|
insert_Tree(treeType, getC_Element_ID());
|
||||||
|
// insert_Tree(MTree_Base.TREETYPE_ElementValue, getC_Element_ID()); Old
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Value/Name change
|
// Value/Name change
|
||||||
if (!newRecord && (is_ValueChanged("Value") || is_ValueChanged("Name")))
|
if (!newRecord && (is_ValueChanged("Value") || is_ValueChanged("Name")))
|
||||||
|
|
|
@ -177,8 +177,16 @@ public class MTree_Base extends X_AD_Tree
|
||||||
else if (treeType.equals(TREETYPE_CMTemplate))
|
else if (treeType.equals(TREETYPE_CMTemplate))
|
||||||
sourceTable = "CM_Template";
|
sourceTable = "CM_Template";
|
||||||
// User Trees
|
// User Trees
|
||||||
// else if (treeType.equals(TREETYPE_User1))
|
// afalcone [Bugs #1837219]
|
||||||
// sourceTable = "??";
|
else if (treeType.equals(TREETYPE_User1) ||
|
||||||
|
treeType.equals(TREETYPE_User2) ||
|
||||||
|
treeType.equals(TREETYPE_User3) ||
|
||||||
|
treeType.equals(TREETYPE_User4))
|
||||||
|
sourceTable = "C_ElementValue";
|
||||||
|
|
||||||
|
// else if (treeType.equals(TREETYPE_User1))
|
||||||
|
// sourceTable = "??";
|
||||||
|
// end afalcone
|
||||||
|
|
||||||
return sourceTable;
|
return sourceTable;
|
||||||
} // getSourceTableName
|
} // getSourceTableName
|
||||||
|
|
Loading…
Reference in New Issue