From 6322c39346e737f5ea6d1698ce5c29dc302a116f Mon Sep 17 00:00:00 2001 From: Arthur Maniet Date: Fri, 7 Aug 2015 12:56:41 +0200 Subject: [PATCH] [FIX] account: reconciliation widget: new line update upon typing Properly bind the keyup event on the , which can be the field widget root $el --- .../static/src/js/account_reconciliation_widgets.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/account/static/src/js/account_reconciliation_widgets.js b/addons/account/static/src/js/account_reconciliation_widgets.js index e4173d79cea..bc24600247a 100644 --- a/addons/account/static/src/js/account_reconciliation_widgets.js +++ b/addons/account/static/src/js/account_reconciliation_widgets.js @@ -568,10 +568,11 @@ var abstractReconciliationLine = Widget.extend({ field.appendTo($field_container.find("td")); self.$(".create_form").prepend($field_container); - // now that widget's dom has been created (appendTo does that), bind events - if (field_data.field_properties.type != "many2one") { - // Triggers change:value TODO : moche bind ? - field.$el.find("input").keyup(function(e, field){ field.commit_value(); }.bind(null, null, field)); + // Change field value on keypress instead of blur + if (field_data.field_properties.type !== "many2one") { + field.$el.find('input').andSelf().filter('input').keyup(function() { + this.store_dom_value(); + }.bind(field)); } // Hide the field if group not OK