IDEMPIERE-109 / Process parameter without element shouldn't be Centrally Maintained

This commit is contained in:
Nicolas Micoud 2012-04-25 17:52:54 +02:00
parent b2338cc04d
commit 5aecf6c941
2 changed files with 14 additions and 1 deletions

View File

@ -78,6 +78,7 @@ public class SynchronizeTerminology extends SvrProcess
rs.close();
trx.commit(true);
// Create Elements for Process Parameters which are centrally maintained
/* IDEMPIERE 109 - this create unwanted Element
sql="SELECT DISTINCT ColumnName, Name, Description, Help, EntityType "
+" FROM AD_PROCESS_PARA p "
+" WHERE NOT EXISTS "
@ -102,7 +103,7 @@ public class SynchronizeTerminology extends SvrProcess
}
pstmt.close();
rs.close();
trx.commit(true);
trx.commit(true);*/
log.info("Adding missing Element Translations");
sql="INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID,"
+" IsActive, Created, CreatedBy, Updated, UpdatedBy,"

View File

@ -268,4 +268,16 @@ public class MProcessPara extends X_AD_Process_Para
}
/**************************************************************************
* Before Save
* @param newRecord
* @return save
*/
protected boolean beforeSave (boolean newRecord)
{
if (isCentrallyMaintained() && getAD_Element_ID() == 0)
setIsCentrallyMaintained(false); // IDEMPIERE 109 - param without element can't be centrally maintained
return true;
} // beforeSave
} // MProcessPara