[FIX] calendar: tag template data

Tag template data were wrong since many2manytag color introduction
This commit is contained in:
qsm-odoo
2015-09-11 17:50:38 +02:00
parent 39e0cd68fb
commit 40fcfcb822
2 changed files with 9 additions and 2 deletions
@@ -239,7 +239,14 @@ var Many2ManyAttendee = FieldMany2ManyTags.extend({
tag_template: "Many2ManyAttendeeTag",
get_render_data: function(ids){
var dataset = new data.DataSetStatic(this, this.field.relation, this.build_context());
return dataset.call('get_attendee_detail',[ids, this.getParent().datarecord.id || false]);
return dataset.call('get_attendee_detail',[ids, this.getParent().datarecord.id || false])
.then(process_data);
function process_data(data) {
return _.map(data, function(d) {
return _.object(['id', 'name', 'status'], d);
});
}
}
});
@@ -2,7 +2,7 @@
<template>
<t t-name="Many2ManyAttendeeTag" t-extend="FieldMany2ManyTag">
<t t-jquery="span:first" t-operation="prepend">
<span t-attf-class="o_calendar_invitation #{el[2]}"/>
<span t-attf-class="o_calendar_invitation #{el['status']}"/>
</t>
</t>