[fix] improvement of previoux fix

bzr revid: nicolas.vanhoren@openerp.com-20120410132031-w4azgtolqi0xoazi
This commit is contained in:
niv-openerp 2012-04-10 15:20:31 +02:00
parent a4c4729251
commit be3a3292b2
1 changed files with 2 additions and 1 deletions

View File

@ -944,7 +944,8 @@ openerp.web.form.FormRenderingEngine = openerp.web.Class.extend({
var found = false;
this.$form.find('label[for="' + name + '"]').each(function(i ,el) {
$(el).parents().each(function(unused, tag) {
if (tag.tagName.toLowerCase() in self.tags_registry.map)
var name = tag.tagName.toLowerCase();
if (name === "field" || name in self.tags_registry.map)
found = true;
});
});