</ul>
- <div class="oe_kanban_partner_categories">
- <span class="oe_kanban_list_many2many">
- <div modifiers="{}" name="tag_ids" class="oe_form_field oe_tags" model="fleet.vehicle.tag" t-att-data="record.tag_ids.raw_value" />
- </span>
- </div>
-
+ <field name="tag_ids"/>
</div>
</div>
</t>
'hr_recruitment_data.xml'
],
'demo': ['hr_recruitment_demo.yml'],
- 'js': ['static/src/js/hr_recruitment.js'],
'test': ['test/recruitment_process.yml'],
'installable': True,
'auto_install': False,
</div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
- <div class="oe_left oe_tags">
- <field name="categ_ids"/>
- </div>
+ <field name="categ_ids"/>
</div>
</div>
<div class="oe_clear"></div>
+++ /dev/null
-openerp.hr_recruitment = function(openerp) {
- openerp.web_kanban.KanbanView.include({
- applicant_display_categ_names: function() {
- /*
- * Set proper names to applicant 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, 'hr.applicant_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 === 'hr.applicant') {
- self.applicant_display_categ_names();
- }
- }
- });
-};
<field name="version_id"/>
</div>
<div class="oe_kanban_footer_left">
- <div class="oe_left oe_tags">
- <t t-foreach="record.categ_ids.raw_value" t-as="categ_id">
- <span class="oe_tag" t-att-data-categ_id="categ_id"></span>
- </t>
- <field name="categ_ids"/>
- </div>
+ <field name="categ_ids"/>
<div class="oe_right">
Creation: <field name="create_date"/>
<span class="oe_kanban_highlight">
</span>
</div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
- <div class="oe_left oe_tags">
- <t t-foreach="record.categ_ids.raw_value" t-as="categ_id">
- <span class="oe_tag" t-att-data-categ_id="categ_id"></span>
- </t>
- </div>
+ <field name="categ_ids"/>
</div>
</div>
<div class="oe_clear"></div>
});
});
},
- 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){
this._super.apply(this, arguments);
}
},
- bind_events: function() {
- this._super();
- this.view.project_display_categ_names();
- },
});
};
'installable': True,
'auto_install': False,
'application': True,
- 'js': ['static/src/js/project_issue.js'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
<field name="version_id"/>
</div>
<div class="oe_kanban_footer_left">
- <div class="oe_left oe_tags">
- <field name="categ_ids"/>
- </div>
+ <field name="categ_ids"/>
<div class="oe_right">
<span class="oe_kanban_highlight">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
+++ /dev/null
-openerp.portal_project_issue = function(openerp) {
- openerp.web_kanban.KanbanView.include({
- on_groups_started: function() {
- var self = this;
- self._super.apply(this, arguments);
-
- if (self.dataset.model === 'project.issue') {
- // Load project's categories names from m2m field
- self.project_display_categ_names();
- }
- }
- });
-};