From 888b4f073eb898ccba1102cf3920672a86941238 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Mon, 10 Jun 2013 19:39:09 +0800 Subject: [PATCH] IDEMPIERE-840 Improvement to Request model class --- .../src/org/compiere/model/RequestValidator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/RequestValidator.java b/org.adempiere.base/src/org/compiere/model/RequestValidator.java index a6a4ec19dd..260283b2f4 100644 --- a/org.adempiere.base/src/org/compiere/model/RequestValidator.java +++ b/org.adempiere.base/src/org/compiere/model/RequestValidator.java @@ -76,9 +76,9 @@ public class RequestValidator implements ModelValidator, EventHandler { MRequest r = (MRequest) po; if (type == TYPE_BEFORE_NEW || type == TYPE_BEFORE_CHANGE) - beforeSaveRequest(r); + beforeSaveRequest(r, type == TYPE_BEFORE_NEW); else if (type == TYPE_AFTER_NEW || type == TYPE_AFTER_CHANGE) - afterSaveRequest(r); + afterSaveRequest(r, type == TYPE_AFTER_NEW); } return null; } @@ -89,10 +89,10 @@ public class RequestValidator implements ModelValidator, EventHandler return null; } - public static String beforeSaveRequest(MRequest r) + public static String beforeSaveRequest(MRequest r, boolean newRecord) { // New - if (r.is_new()) + if (newRecord) return null; // Change Log @@ -208,10 +208,10 @@ public class RequestValidator implements ModelValidator, EventHandler return null; } - public static String afterSaveRequest(MRequest r) + public static String afterSaveRequest(MRequest r, boolean newRecord) { // Initial Mail - if (r.is_new()) + if (newRecord) sendNotices(r, new ArrayList()); return null;