From 2ea22c52340f3a8485b89173efeb2793a6260ec8 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 31 Oct 2012 11:32:33 +0100 Subject: [PATCH] [FIX] first field of editable list o2ms not showing their content Bug introduced in xmo@openerp.com-20121019100725-izotstggoxpfjk6k (and xmo@openerp.com-20121022103935-78bm40gfotpt1ds6 to the extent that in the former the cell would disappear altogether and in the latter its content would be blanked out). As it was the last 15 times I made this mistake, adding a "!" before an `instanceof` call and forgetting parens just negates the object (first argument to `instanceof`), not the whole expression, and thus the expression is *always false* (the result of !a is a `boolean` primitive, and `primitive instanceof ObjectType` is always false) bzr revid: xmo@openerp.com-20121031103233-9qw40l6m2vy0l3m1 --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5ecad26e5df..76ddeb86acf 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3321,7 +3321,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ e.cancel = true; }); _(controller.columns).find(function (column) { - if (!column instanceof instance.web.list.Handle) { + if (!(column instanceof instance.web.list.Handle)) { return false; } column.modifiers.invisible = true;