[FIX] action buttons with a name composed solely of digits in list view
authorXavier Morel <xmo@openerp.com>
Mon, 17 Oct 2011 14:10:22 +0000 (16:10 +0200)
committerXavier Morel <xmo@openerp.com>
Mon, 17 Oct 2011 14:10:22 +0000 (16:10 +0200)
lp bug: https://launchpad.net/bugs/869746 fixed

bzr revid: xmo@openerp.com-20111017141022-u7v9aiw08aczpsv1

1  2 
addons/web/static/src/js/view_list.js

@@@ -768,7 -750,7 +768,11 @@@ openerp.web.ListView.List = openerp.web
                         $row = $target.closest('tr'),
                    record_id = self.row_id($row);
  
-                 $(self).trigger('action', [field, record_id, function () {
++                // note: $.data converts data to number if it's composed only
++                // of digits, nice when storing actual numbers, not nice when
++                // storing strings composed only of digits. Force the action
++                // name to be a string
+                 $(self).trigger('action', [field.toString(), record_id, function () {
                      return self.reload_record(self.records.get(record_id));
                  }]);
              })