[FIX] small error, probably due to refactoring, that disabled feature of form buttons.

The feature was to disable button automatically buttons in unsaved o2m to avoid errors.

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

bzr revid: nicolas.vanhoren@openerp.com-20130312170515-qt74ceqm50uscupu
This commit is contained in:
niv-openerp 2013-03-12 18:05:15 +01:00
parent ace0e38574
commit e35e199064
1 changed files with 2 additions and 1 deletions

View File

@ -1892,10 +1892,11 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
if (this.node.attrs.icon && (! /\//.test(this.node.attrs.icon))) {
this.node.attrs.icon = '/web/static/src/img/icons/' + this.node.attrs.icon + '.png';
}
this.view.on('view_content_has_changed', this, this.check_disable);
},
start: function() {
this._super.apply(this, arguments);
this.view.on('view_content_has_changed', this, this.check_disable);
this.check_disable();
this.$el.click(this.on_click);
if (this.node.attrs.help || instance.session.debug) {
this.do_attach_tooltip();