IDEMPIERE-5238 Record_ID editor - fix 2Pack broken (#1754)
This commit is contained in:
parent
59069f4cfe
commit
d9764ce54e
|
@ -19,7 +19,6 @@ package org.compiere.model;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.compiere.util.DisplayType;
|
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
import org.idempiere.cache.ImmutableIntPOCache;
|
import org.idempiere.cache.ImmutableIntPOCache;
|
||||||
|
@ -218,33 +217,6 @@ public class MField extends X_AD_Field implements ImmutablePOSupport
|
||||||
if (getIsToolbarButton() != null)
|
if (getIsToolbarButton() != null)
|
||||||
setIsToolbarButton(null);
|
setIsToolbarButton(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set Table field read only if appears in combination with Record ID (Display Type Record ID)
|
|
||||||
MColumn column = MColumn.get(getAD_Column_ID());
|
|
||||||
if(column.getColumnName().equalsIgnoreCase("AD_Table_ID")) {
|
|
||||||
MTab parent = MTab.get(getAD_Tab_ID());
|
|
||||||
for(MField field : parent.getFields(false, get_TrxName())) {
|
|
||||||
if(MColumn.get(field.getAD_Column_ID()).getColumnName().equalsIgnoreCase("Record_ID")) {
|
|
||||||
if(MColumn.get(field.getAD_Column_ID()).getAD_Reference_ID() == DisplayType.RecordID && !this.isReadOnly()) {
|
|
||||||
this.setIsReadOnly(true);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(column.getColumnName().equalsIgnoreCase("Record_ID") && column.getAD_Reference_ID() == DisplayType.RecordID) {
|
|
||||||
MTab parent = MTab.get(getAD_Tab_ID());
|
|
||||||
for(MField field : parent.getFields(false, get_TrxName())) {
|
|
||||||
if(MColumn.get(field.getAD_Column_ID()).getColumnName().equalsIgnoreCase("AD_Table_ID")) {
|
|
||||||
if(!field.isReadOnly()) {
|
|
||||||
field.setIsReadOnly(true);
|
|
||||||
field.saveEx();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//
|
|
||||||
|
|
||||||
//validate logic expression
|
//validate logic expression
|
||||||
if (newRecord || is_ValueChanged(COLUMNNAME_ReadOnlyLogic)) {
|
if (newRecord || is_ValueChanged(COLUMNNAME_ReadOnlyLogic)) {
|
||||||
|
|
Loading…
Reference in New Issue