IDEMPIERE-974 Issue with Quick Entry editor when a checkbox is added and a new record is created
This commit is contained in:
parent
4ddd82c2e0
commit
210bb251c4
|
@ -0,0 +1,12 @@
|
||||||
|
-- Jun 12, 2013 12:21:45 PM COT
|
||||||
|
-- IDEMPIERE-974 Issue with Quick Entry editor when a checkbox is added and a new record is created
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Fill Minimum Information of:',200180,'D','03c360e6-3cdb-4058-818f-260e3aeff485','FillMinimumlInfo','Y',TO_DATE('2013-06-12 12:21:42','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-06-12 12:21:42','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Jun 12, 2013 12:21:45 PM COT
|
||||||
|
-- IDEMPIERE-974 Issue with Quick Entry editor when a checkbox is added and a new record is created
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200180 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('20130612122145_IDEMPIERE-974.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,13 @@
|
||||||
|
-- Jun 12, 2013 12:21:45 PM COT
|
||||||
|
-- IDEMPIERE-974 Issue with Quick Entry editor when a checkbox is added and a new record is created
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Fill Minimum Information of:',200180,'D','03c360e6-3cdb-4058-818f-260e3aeff485','FillMinimumlInfo','Y',TO_TIMESTAMP('2013-06-12 12:21:42','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-06-12 12:21:42','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Jun 12, 2013 12:21:45 PM COT
|
||||||
|
-- IDEMPIERE-974 Issue with Quick Entry editor when a checkbox is added and a new record is created
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200180 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('20130612122145_IDEMPIERE-974.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -298,8 +298,10 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
boolean anyChange = false;
|
boolean anyChange = false;
|
||||||
|
List<WEditor> specialQuickEditors = new ArrayList<WEditor>();
|
||||||
|
WEditor editor=null;
|
||||||
for (int idxf = 0; idxf < quickEditors.size(); idxf++) {
|
for (int idxf = 0; idxf < quickEditors.size(); idxf++) {
|
||||||
WEditor editor = quickEditors.get(idxf);
|
editor = quickEditors.get(idxf);
|
||||||
Object value = editor.getValue();
|
Object value = editor.getValue();
|
||||||
Object initialValue = initialValues.get(idxf);
|
Object initialValue = initialValues.get(idxf);
|
||||||
|
|
||||||
|
@ -324,11 +326,14 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
|
||||||
|
|
||||||
int parentID = 0;
|
int parentID = 0;
|
||||||
String parentColumn = null;
|
String parentColumn = null;
|
||||||
|
String tabZeroName=null;
|
||||||
|
boolean isParentSave=false;
|
||||||
for (int idxt = 0; idxt < quickTabs.size(); idxt++) {
|
for (int idxt = 0; idxt < quickTabs.size(); idxt++) {
|
||||||
GridTab gridtab = quickTabs.get(idxt);
|
GridTab gridtab = quickTabs.get(idxt);
|
||||||
PO po = quickPOs.get(idxt);
|
PO po = quickPOs.get(idxt);
|
||||||
if (idxt == 0) {
|
if (idxt == 0) {
|
||||||
parentColumn = gridtab.getTableName() + "_ID";
|
parentColumn = gridtab.getTableName() + "_ID";
|
||||||
|
tabZeroName=gridtab.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean savePO = false;
|
boolean savePO = false;
|
||||||
|
@ -339,14 +344,20 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
|
||||||
if (field.getGridTab() != gridtab)
|
if (field.getGridTab() != gridtab)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
WEditor editor = quickEditors.get(idxf);
|
editor = quickEditors.get(idxf);
|
||||||
Object value = editor.getValue();
|
Object value = editor.getValue();
|
||||||
Object initialValue = initialValues.get(idxf);
|
Object initialValue = initialValues.get(idxf);
|
||||||
|
|
||||||
boolean changed = (value != null && initialValue == null)
|
boolean changed = (value != null && initialValue == null)
|
||||||
|| (value == null && initialValue != null)
|
|| (value == null && initialValue != null)
|
||||||
|| (value != null && initialValue != null && !value.equals(initialValue));
|
|| (value != null && initialValue != null && !value.equals(initialValue));
|
||||||
|
if(field.getColumnName().equals("Value")
|
||||||
|
||field.getColumnName().equals("DocumentNo")
|
||||||
|
||field.getColumnName().equals("M_AttributeSetInstance_ID")){
|
||||||
|
if(!specialQuickEditors.contains(field)){
|
||||||
|
specialQuickEditors.add(editor);
|
||||||
|
}
|
||||||
|
}
|
||||||
boolean thisMandatoryError = false;
|
boolean thisMandatoryError = false;
|
||||||
if (field.isMandatory(true)) {
|
if (field.isMandatory(true)) {
|
||||||
if (value == null || value.toString().length() == 0) {
|
if (value == null || value.toString().length() == 0) {
|
||||||
|
@ -374,8 +385,19 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
|
||||||
po.set_ValueOfColumn(parentColumn, parentID);
|
po.set_ValueOfColumn(parentColumn, parentID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(gridtab.getTabLevel()>0 && !isParentSave){
|
||||||
|
FDialog.error(m_WindowNo, this, "FillMinimumInfo",tabZeroName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
po.saveEx();
|
po.saveEx();
|
||||||
|
if(gridtab.getTabLevel()==0){
|
||||||
|
isParentSave=true;
|
||||||
|
}
|
||||||
|
for(WEditor we:specialQuickEditors){
|
||||||
|
if(po.get_Value(we.getColumnName())!=null){
|
||||||
|
we.setValue(po.get_Value(we.getColumnName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (idxt == 0) {
|
if (idxt == 0) {
|
||||||
parentID = po.get_ID();
|
parentID = po.get_ID();
|
||||||
|
|
Loading…
Reference in New Issue