[IMP] Replace underscores in button @string. We don't have buttons keybinding in webclient

bzr revid: fme@openerp.com-20110727143731-lky82trxmnnbh4uo
This commit is contained in:
Fabien Meghazi
2011-07-27 16:37:31 +02:00
parent f1cd9923a5
commit 470faa8bc9
+4
View File
@@ -714,6 +714,10 @@ openerp.base.form.WidgetButton = openerp.base.form.Widget.extend({
init: function(view, node) {
this._super(view, node);
this.template = "WidgetButton";
if (this.string) {
// We don't have button key bindings in the webclient
this.string = this.string.replace(/_/g, '');
}
if (node.attrs.default_focus == '1') {
// TODO fme: provide enter key binding to widgets
this.view.default_focus_button = this;