diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-11-28 12:54:17 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-11-28 12:54:17 +0100 |
| commit | 9784c7dfa5dd0fa4ccbb8c84bdf1b46dcf218af9 (patch) | |
| tree | 86874dbfa109fddc3cc23e88906d2151d38c8770 /addons/project/static/src | |
| parent | cb32b7e76fbf59049654cbff7ad87c3bc5a881cb (diff) | |
[REM] Removed manual many2many tags from kanban views
bzr revid: fme@openerp.com-20121128115417-sgpf3hr4rgwglrbm
Diffstat (limited to 'addons/project/static/src')
| -rw-r--r-- | addons/project/static/src/js/project.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index 38578a6226e..ce8be146e54 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -25,37 +25,12 @@ openerp.project = function(openerp) { }); }); }, - project_display_categ_names: function() { - /* - * Set proper names to project categories. - * In kanban views, many2many fields only return a list of ids. - * Therefore, we have to fetch the matching data by ourselves. - */ - var self = this; - var categ_ids = []; - - // Collect categories ids - self.$el.find('span[data-categ_id]').each(function() { - categ_ids.push($(this).data('categ_id')); - }); - - // Find their matching names - var dataset = new openerp.web.DataSetSearch(self, 'project.category', self.session.context, [['id', 'in', _.uniq(categ_ids)]]); - dataset.read_slice(['id', 'name']).done(function(result) { - _.each(result, function(v, k) { - // Set the proper value in the DOM and display the element - self.$el.find('span[data-categ_id=' + v.id + ']').text(v.name); - }); - }); - }, on_groups_started: function() { var self = this; self._super.apply(self, arguments); if (self.dataset.model === 'project.project') { self.project_display_members_names(); - } else if (self.dataset.model === 'project.task') { - self.project_display_categ_names(); } }, on_record_moved: function(record, old_group, old_index, new_group, new_index){ @@ -74,9 +49,5 @@ openerp.project = function(openerp) { this._super.apply(this, arguments); } }, - bind_events: function() { - this._super(); - this.view.project_display_categ_names(); - }, }); }; |
