From 8f341d355552d2632d507518f563a8b04159358c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 5 Nov 2012 12:16:35 +0100 Subject: [PATCH] [IMP] put back commit_value bzr revid: nicolas.vanhoren@openerp.com-20121105111635-5aygxpvlfuxqozu5 --- addons/web/static/src/js/view_form.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bee3224407a..01eb8237ba2 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2010,6 +2010,11 @@ instance.web.form.FieldInterface = { * Called when the translate button is clicked. */ on_translate: function() {}, + /** + This method is called by the form view before reading on_change values and before saving. It tells + the field to save its value before reading it using get_value(). Must return a deferred. + */ + commit_value: function() {}, }; /** @@ -2153,7 +2158,10 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w } this.$el.attr('style', style); this.$el.css('minHeight', height); - } + }, + commit_value: function() { + return $.when(); + }, }); /**