[fix]fix bug 884207.
lp bug: https://launchpad.net/bugs/884207 fixed bzr revid: vme@tinyerp.com-20111220121135-k0pwb4j3jzwrr1we
This commit is contained in:
parent
8ba259b3f6
commit
d31512342a
|
@ -253,13 +253,15 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo
|
|||
if (attrs.invisible) { return ''; }
|
||||
if (column.tag === 'button') {
|
||||
return [
|
||||
'<button type="button" title="', column.string || '', '">',
|
||||
'<button type="button" title="', column.string || '', '" ',
|
||||
(isNaN(row_data["id"].value)
|
||||
&& openerp.web.BufferedDataSet.virtual_id_regex.test(row_data["id"].value))
|
||||
?'disabled="disabled"':'','>',
|
||||
'<img src="', openerp.connection.prefix, '/web/static/src/img/icons/', column.icon, '.png"',
|
||||
' alt="', column.string || '', '"/>',
|
||||
'</button>'
|
||||
].join('')
|
||||
}
|
||||
|
||||
if (!row_data[column.id]) {
|
||||
return value_if_empty === undefined ? '' : value_if_empty;
|
||||
}
|
||||
|
|
|
@ -557,6 +557,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
|
|||
* @param {Function} callback should be called after the action is executed, if non-null
|
||||
*/
|
||||
do_button_action: function (name, id, callback) {
|
||||
var self = this;
|
||||
var action = _.detect(this.columns, function (field) {
|
||||
return field.name === name;
|
||||
});
|
||||
|
@ -575,7 +576,9 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
|
|||
c.add(action.context);
|
||||
}
|
||||
action.context = c;
|
||||
this.do_execute_action(action, this.dataset, id, callback);
|
||||
this.do_execute_action(action, this.dataset, id, function(){
|
||||
self.o2m.view.reload();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Handles the activation of a record (clicking on it)
|
||||
|
|
Loading…
Reference in New Issue