[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
This commit is contained in:
Xavier Morel 2012-10-31 11:32:33 +01:00
parent 3c28326317
commit 2ea22c5234
1 changed files with 1 additions and 1 deletions

View File

@ -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;