details: /erp/devel/pi/rev/a459b43a4f83
changeset: 11726:a459b43a4f83
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Apr 27 12:59:52 2011 +0200
summary: Fixes issue 16881: Not possible to save currency conversion rates in
form view
details: /erp/devel/pi/rev/ea278bfac87d
changeset: 11727:ea278bfac87d
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Apr 27 13:00:21 2011 +0200
summary: Fixes issue 16290: Date filtering format is not the same as column
date format
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
| 5 +++++
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 8 ++++++++
src/org/openbravo/base/model/domaintype/DateDomainType.java
| 2 +-
3 files changed, 14 insertions(+), 1 deletions(-)
diffs (52 lines):
diff -r 9e690153ed1a -r ea278bfac87d
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Wed Apr 27 12:57:14 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Wed Apr 27 13:00:21 2011 +0200
@@ -681,6 +681,7 @@
isc.ClassFactory.defineClass('OBMiniDateRangeItem', isc.MiniDateRangeItem);
isc.OBMiniDateRangeItem.addProperties({
+ // note this one needs to be set to let the formatDate be called below
dateDisplayFormat: OB.Format.date,
rangeDialogConstructor: isc.OBDateRangeDialog,
@@ -690,6 +691,10 @@
return false;
}
return true;
+ },
+
+ formatDate: function(dt) {
+ return OB.Utilities.Date.JSToOB(dt, OB.Format.date);
}
});
diff -r 9e690153ed1a -r ea278bfac87d
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Wed Apr 27 12:57:14 2011 +0200
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Wed Apr 27 13:00:21 2011 +0200
@@ -165,6 +165,14 @@
// allow max 10000 days/years/quarters in the past/future
isc.RelativeDateItem.changeDefaults('quantityFieldDefaults', {max: 1000});
+isc.RelativeDateItem.addProperties({
+ // overridden as the displayDateFormat does not seem to work fine
+ formatDate: function(dt) {
+ return OB.Utilities.Date.JSToOB(dt, OB.Format.date);
+ }
+
+});
+
// uncomment this code and put a breakpoint to get a better control
// on from where async operations are started
//isc.Class._fireOnPause = isc.Class.fireOnPause;
diff -r 9e690153ed1a -r ea278bfac87d
src/org/openbravo/base/model/domaintype/DateDomainType.java
--- a/src/org/openbravo/base/model/domaintype/DateDomainType.java Wed Apr
27 12:57:14 2011 +0200
+++ b/src/org/openbravo/base/model/domaintype/DateDomainType.java Wed Apr
27 13:00:21 2011 +0200
@@ -31,7 +31,7 @@
public class DateDomainType extends BasePrimitiveDomainType {
- private final SimpleDateFormat xmlDateFormat = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.S'Z'");
+ private final SimpleDateFormat xmlDateFormat = new
SimpleDateFormat("yyyy-MM-dd");
public DateDomainType() {
xmlDateFormat.setLenient(true);
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits