details: /erp/devel/pi/rev/0fca97269ea5
changeset: 11299:0fca97269ea5
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Mon Mar 21 09:59:15 2011 +0100
summary: Fixed issue 16392. @#Date@ defaults will be computed correctly in
case of non-standard date format
diffstat:
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
| 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 14484c838ed8 -r 0fca97269ea5
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
Fri Mar 18 23:11:11 2011 +0100
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
Mon Mar 21 09:59:15 2011 +0100
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -162,7 +163,9 @@
if (defaultS == null || defaultS.equals("\"\"")) {
defaultS = "";
}
- if (!defaultS.startsWith("@SQL=")) {
+ if (defaultS.equalsIgnoreCase("@#Date@")) {
+ columnValue = this.convertToClassicString(new Date());
+ } else if (!defaultS.startsWith("@SQL=")) {
columnValue = Utility.getDefault(new DalConnectionProvider(false), rq
.getVariablesSecureApp(), field.getColumn().getDBColumnName(),
defaultS, field
.getTab().getWindow().getId(), "");
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits