hg merge b153e9e42945

This commit is contained in:
Carlos Ruiz 2012-10-31 09:23:45 -05:00
commit 18aebedfb7
2 changed files with 12 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import java.util.logging.Level;
import org.adempiere.exceptions.DBException;
import org.compiere.Adempiere;
import org.compiere.model.MPaymentLookup;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
@ -417,12 +418,21 @@ public class ModelClassGenerator
sb.append("\tpublic void set").append(columnName).append(" (").append(dataType).append(" ").append(columnName).append(")").append(NL)
.append("\t{").append(NL)
;
// List Validation
if (AD_Reference_ID != 0 && String.class == clazz)
{
String staticVar = addListValidation (sb, AD_Reference_ID, columnName);
sb.insert(0, staticVar);
}
// Payment Validation
if (displayType == DisplayType.Payment)
{
String staticVar = addListValidation (sb, MPaymentLookup.PAYMENTRULE_AD_Reference_ID, columnName);
sb.insert(0, staticVar);
}
// setValue ("ColumnName", xx);
if (virtualColumn)
{

View File

@ -39,7 +39,7 @@ public class MPaymentLookup extends Lookup implements Serializable {
*/
private static final long serialVersionUID = -6863672221350217533L;
private static final int PAYMENT_RULE_REFERENCE_ID = 195;
public static final int PAYMENTRULE_AD_Reference_ID = 195;
/** Context */
private Properties m_ctx;
@ -136,7 +136,7 @@ public class MPaymentLookup extends Lookup implements Serializable {
try
{
pstmt = DB.prepareStatement(sb.toString(), null);
pstmt.setInt(1, PAYMENT_RULE_REFERENCE_ID);
pstmt.setInt(1, PAYMENTRULE_AD_Reference_ID);
if (!isBaseLanguage)
pstmt.setString(2, ad_language);
rs = pstmt.executeQuery();