details: https://code.openbravo.com/erp/devel/pi/rev/d5b39cc3eae0
changeset: 16717:d5b39cc3eae0
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Thu May 31 15:48:36 2012 +0200
summary: Fixes issue 20507: YesNo filter fields have been fixed.
There was a problem with the initialization of the YesNo fields in
smartcliente. They were being initialized with 'Yes' or 'No' instead of with
true and false, which are the possible expected values.
The getCriterion function has been overwritten, so it detects if the value is
faulty and returns a proper one.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
| 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r b311c5f17ac7 -r d5b39cc3eae0
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
Thu May 31 14:15:46 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
Thu May 31 15:48:36 2012 +0200
@@ -55,5 +55,15 @@
},
formatPickListValue: function (value, record, field, rowNum, colNum) {
return OB.Utilities.getYesNoDisplayValue(value);
+ },
+
+ getCriterion: function() {
+ var criterion = this.Super('getCriterion', arguments);
+ if (criterion && criterion.value && (criterion.value === 'Yes' ||
criterion.value === 'yes')) {
+ criterion.value = true;
+ } else if (criterion && criterion.value && (criterion.value === 'No'
|| criterion.value === 'no')) {
+ criterion.value = false;
+ }
+ return criterion;
}
});
\ No newline at end of file
------------------------------------------------------------------------------
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