details: https://code.openbravo.com/erp/devel/pi/rev/f63f8665c1af
changeset: 16569:f63f8665c1af
user: Miguel de Juana <miguel.dejuana <at> openbravo.com>
date: Thu May 17 18:06:47 2012 +0200
summary: Fixed issue 20496: ProcessMonitor-FormView, negative Timezone print
well DateTime
In Process Monitor window, opening form view, the startTime and endTime is
changed to our timezone (in the grid it is already done).
The problem is in the processColumnValue method of the ob-view-form.js. The
Date elements are processed AGAIN to be changed to our timezone and it causes
an error when our timezone is a negative timezone(UTC-1 ,UTC-2...).
References "Date" and "DateTime" don't need to be processed in
processColumnValue but "Time" reference has not been processed yet and it have
to be changed to our timezone in processColumnValue.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 4fbd17b28f16 -r f63f8665c1af
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Thu May 17 16:25:59 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Thu May 17 18:06:47 2012 +0200
@@ -909,7 +909,7 @@
var typeInstance;
var assignValue;
var assignClassicValue;
- var isDate, i, valueMap = {},
+ var isDate, isTime, i, valueMap = {},
oldValue, field = this.getFieldFromColumnName(columnName),
entries = columnValue.entries;
// not a field on the form, probably a datasource field
@@ -962,10 +962,11 @@
// note: do not use clearvalue as this removes the value from the form
this.setValue(field.name, null);
} else if (columnValue.value || columnValue.value === 0 ||
columnValue.value === false) {
- isDate = field.type && (isc.SimpleType.getType(field.type).inheritsFrom
=== 'date' || isc.SimpleType.getType(field.type).inheritsFrom === 'datetime' ||
isc.SimpleType.getType(field.type).inheritsFrom === 'time');
- if (isDate) {
+ isDate = field.type && (isc.SimpleType.getType(field.type).inheritsFrom
=== 'date' || isc.SimpleType.getType(field.type).inheritsFrom === 'datetime');
+ isTime = field.type && isc.SimpleType.getType(field.type).inheritsFrom
=== 'time';
+ if (isTime) {
this.setItemValue(field.name,
isc.Date.parseSchemaDate(columnValue.value));
- } else if (columnValue.hasDateDefault) {
+ } else if (isDate || columnValue.hasDateDefault) {
this.setItemValue(field.name, columnValue.classicValue);
} else {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits