IDEMPIERE-4993 : Tab Editor do not show field group when opened at tenant level (#914)
This commit is contained in:
parent
c24270615e
commit
0509df7912
|
@ -921,26 +921,13 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
|
||||||
editorColumn.setValue(MColumn.getColumnName(Env.getCtx(), field.getAD_Column_ID()));
|
editorColumn.setValue(MColumn.getColumnName(Env.getCtx(), field.getAD_Column_ID()));
|
||||||
|
|
||||||
GridField gridField = getGridField(field);
|
GridField gridField = getGridField(field);
|
||||||
String fieldGroup = "";
|
|
||||||
String fieldGroupType = "";
|
|
||||||
if (field.getAD_FieldGroup_ID() > 0) {
|
|
||||||
if (isBaseLang)
|
|
||||||
{
|
|
||||||
fieldGroup = field.getAD_FieldGroup().getName();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fieldGroup = ((X_AD_FieldGroup) field.getAD_FieldGroup()).get_Translation(X_AD_FieldGroup.COLUMNNAME_Name);
|
|
||||||
}
|
|
||||||
fieldGroupType = field.getAD_FieldGroup().getFieldGroupType();
|
|
||||||
}
|
|
||||||
gridField.getVO().Header = field.getName();
|
gridField.getVO().Header = field.getName();
|
||||||
gridField.getVO().Description = field.getDescription();
|
gridField.getVO().Description = field.getDescription();
|
||||||
gridField.getVO().Help = field.getHelp();
|
gridField.getVO().Help = field.getHelp();
|
||||||
gridField.getVO().Placeholder = field.getPlaceholder();
|
gridField.getVO().Placeholder = field.getPlaceholder();
|
||||||
gridField.getVO().IsDisplayed = field.isDisplayed();
|
gridField.getVO().IsDisplayed = field.isDisplayed();
|
||||||
gridField.getVO().FieldGroup = fieldGroup;
|
gridField.getVO().FieldGroup = getFieldGroup(field);
|
||||||
gridField.getVO().FieldGroupType = fieldGroupType;
|
gridField.getVO().FieldGroupType = getFieldGroupType(field);
|
||||||
gridField.getVO().XPosition = field.getXPosition();
|
gridField.getVO().XPosition = field.getXPosition();
|
||||||
gridField.getVO().ColumnSpan = field.getColumnSpan();
|
gridField.getVO().ColumnSpan = field.getColumnSpan();
|
||||||
gridField.getVO().NumLines = field.getNumLines();
|
gridField.getVO().NumLines = field.getNumLines();
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.compiere.model.I_AD_Field;
|
||||||
import org.compiere.model.MField;
|
import org.compiere.model.MField;
|
||||||
import org.compiere.model.MTab;
|
import org.compiere.model.MTab;
|
||||||
import org.compiere.model.MUserDefField;
|
import org.compiere.model.MUserDefField;
|
||||||
|
import org.compiere.model.X_AD_FieldGroup;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -110,6 +111,8 @@ public class TabEditor
|
||||||
gridField.getVO().XPosition = field.getXPosition();
|
gridField.getVO().XPosition = field.getXPosition();
|
||||||
gridField.getVO().ColumnSpan = field.getColumnSpan();
|
gridField.getVO().ColumnSpan = field.getColumnSpan();
|
||||||
gridField.getVO().IsDisplayed = field.isDisplayed();
|
gridField.getVO().IsDisplayed = field.isDisplayed();
|
||||||
|
gridField.getVO().FieldGroup = getFieldGroup(field);
|
||||||
|
gridField.getVO().FieldGroupType = getFieldGroupType(field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,5 +450,23 @@ public class TabEditor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return the name of the group field of the field */
|
||||||
|
public String getFieldGroup(MField field) {
|
||||||
|
if (field.getAD_FieldGroup_ID() > 0) {
|
||||||
|
if (isBaseLang)
|
||||||
|
return field.getAD_FieldGroup().getName();
|
||||||
|
else
|
||||||
|
return ((X_AD_FieldGroup) field.getAD_FieldGroup()).get_Translation(X_AD_FieldGroup.COLUMNNAME_Name);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return the type of the group field of the field */
|
||||||
|
public String getFieldGroupType(MField field) {
|
||||||
|
if (field.getAD_FieldGroup_ID() > 0)
|
||||||
|
return field.getAD_FieldGroup().getFieldGroupType();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
} // TabEditor
|
} // TabEditor
|
||||||
|
|
Loading…
Reference in New Issue