Browse Source

[ADD] list.column display

pull/319/head
Iván Todorovich 9 years ago
committed by Holger Brunn
parent
commit
23043638ce
  1. 1
      web_widget_one2many_tags/README.rst
  2. 14
      web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js

1
web_widget_one2many_tags/README.rst

@ -36,6 +36,7 @@ Contributors
------------ ------------
* Holger Brunn <hbrunn@therp.nl> * Holger Brunn <hbrunn@therp.nl>
* Iván Todorovich <ivan.todorovich@gmail.com>
Maintainer Maintainer
---------- ----------

14
web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js

@ -72,8 +72,22 @@ openerp.web_widget_one2many_tags = function(instance)
return result; return result;
}, },
}); });
instance.web.form.widgets.add( instance.web.form.widgets.add(
'one2many_tags', 'one2many_tags',
'instance.web_widget_one2many_tags.FieldOne2ManyTags' 'instance.web_widget_one2many_tags.FieldOne2ManyTags'
); );
instance.web.list.One2ManyTags = instance.web.list.Many2Many.extend({
init: function () {
this._super.apply(this, arguments);
// Treat it as many2many to trick odoo into populating '__display'.
this.type = 'many2many';
},
});
instance.web.list.columns.add(
'field.one2many_tags',
'instance.web.list.One2ManyTags'
);
} }
Loading…
Cancel
Save