[FIX] action buttons with a name composed solely of digits in list view

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

bzr revid: xmo@openerp.com-20111017141022-u7v9aiw08aczpsv1
This commit is contained in:
Xavier Morel 2011-10-17 16:10:22 +02:00
commit 3790db3e40
1 changed files with 5 additions and 1 deletions

View File

@ -768,7 +768,11 @@ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.Lis
$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));
}]);
})