[FIX] format: trying to format an undefined value as the same effect as a value to...
authorMartin Trigaux <mat@openerp.com>
Mon, 13 Jan 2014 17:23:47 +0000 (18:23 +0100)
committerMartin Trigaux <mat@openerp.com>
Mon, 13 Jan 2014 17:23:47 +0000 (18:23 +0100)
bzr revid: mat@openerp.com-20140113172347-00anf6lh2jxin84w

addons/web/static/src/js/formats.js

index 854c5f7..998855c 100644 (file)
@@ -142,6 +142,7 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
             }
             console.warn('Field', descriptor, 'had an empty string as value, treating as false...');
         case false:
+        case undefined:
         case Infinity:
         case -Infinity:
             return value_if_empty === undefined ?  '' : value_if_empty;