From e35e1990641077eaa3ea0b5e164278918d515547 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 12 Mar 2013 18:05:15 +0100 Subject: [PATCH] [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 --- addons/web/static/src/js/view_form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 673bfc7058e..57b528e7ecf 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -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();