From 43fb6b3ee39999fd55a045a961372691b8926e58 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 11 Jul 2012 17:25:58 +0200 Subject: [PATCH] [CHG] require that Widget#attributes be an object if present, not a function bzr revid: xmo@openerp.com-20120711152558-9jm096g7mowgfvf5 --- addons/web/static/src/js/corelib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 73fa6839607..d71ff91247d 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -711,10 +711,10 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { $el = $(_.str.trim(instance.web.qweb.render( this.template, {widget: this}))); } else { - var attrs = _.extend({}, getValue(this, 'attributes') || {}); + var attrs = _.extend({}, this.attributes || {}); if (this.id) { attrs.id = this.id; } if (this.className) { attrs['class'] = this.className; } - $el = $(this.make(this.tagName, attrs)) + $el = $(this.make(this.tagName, attrs)); } var $oldel = this.$el; this.setElement($el);