[CHG] require that Widget#attributes be an object if present, not a function

bzr revid: xmo@openerp.com-20120711152558-9jm096g7mowgfvf5
This commit is contained in:
Xavier Morel
2012-07-11 17:25:58 +02:00
parent f0ad5fedac
commit 43fb6b3ee3
+2 -2
View File
@@ -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);