comment to simplify widget constructors

bzr revid: al@openerp.com-20110317003057-kmhibna1xbzc65lj
This commit is contained in:
Antony Lesuisse 2011-03-17 01:30:57 +01:00
parent 4beb59472e
commit b28c65dcbd
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ openerp.base.DataRecord = openerp.base.Controller.extend({
});
openerp.base.Widget = openerp.base.Controller.extend({
// TODO Change this to init: function(view, node) { and use view.session and a new element_id for the super
// it means that widgets are special controllers
init: function(session, element_id, view, node) {
var type = view.fields_view.fields[node.attrs.name] || {};
this.type = node.attrs.widget || type.type || node.tag;