[FIX]: Bug #942894 This fix the format.js file to make openerp show a count of ids instead the list of them in 2om relationship.

lp bug: https://launchpad.net/bugs/942894 fixed

bzr revid: wbeltran@infostudio.com.ec-20120504172303-r4pynkj4vofeptk5
This commit is contained in:
William Beltrán 2012-05-04 12:23:03 -05:00
parent f66db86718
commit f994797896
1 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,10 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
case 'many2one':
// name_get value format
return value[1];
case 'one2many':
// this is to show count of ids related in this o2m relation instead the list of them for example will show this:(5) instead of this 1,2,5,8,76
count_ids='('+value.length.toString()+')'
return count_ids;
case 'datetime':
if (typeof(value) == "string")
value = instance.web.auto_str_to_date(value);