From 23043638ce783a7c24a37a92ad3a0e426909c437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Todorovich?= Date: Tue, 8 Mar 2016 22:43:27 -0300 Subject: [PATCH] [ADD] list.column display --- web_widget_one2many_tags/README.rst | 1 + .../static/src/js/web_widget_one2many_tags.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) mode change 100644 => 100755 web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js diff --git a/web_widget_one2many_tags/README.rst b/web_widget_one2many_tags/README.rst index 1bd30efc..752c8c2e 100644 --- a/web_widget_one2many_tags/README.rst +++ b/web_widget_one2many_tags/README.rst @@ -36,6 +36,7 @@ Contributors ------------ * Holger Brunn +* Iván Todorovich Maintainer ---------- diff --git a/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js b/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js old mode 100644 new mode 100755 index 002110a7..04bba4ba --- a/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js +++ b/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; }, }); + instance.web.form.widgets.add( 'one2many_tags', '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' + ); }