IDEMPIERE-392 Redesign payment button - Fix missing reference in generate model class for column with 'Payment' display type
This commit is contained in:
parent
14f2125874
commit
6c71f29822
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue