[FIX] format_value: consider text fields te same way as char fields for empty values

bzr revid: mat@openerp.com-20140117113141-i95ncy04azzmahqk
This commit is contained in:
Martin Trigaux
2014-01-17 19:31:41 +08:00
parent 679cfaaa03
commit 2dc722ac80
+1 -1
View File
@@ -137,7 +137,7 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
//noinspection FallthroughInSwitchStatementJS
switch (value) {
case '':
if (descriptor.type === 'char') {
if (descriptor.type === 'char' || descriptor.type === 'text') {
return '';
}
console.warn('Field', descriptor, 'had an empty string as value, treating as false...');