[IMP] Improved aggregates
bzr revid: fme@openerp.com-20110926150424-o6nsd1h26y8o945d
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_kanban_view .fold-columns-icon {
|
||||
float: left;
|
||||
padding: 2px 2px 0 0;
|
||||
}
|
||||
.openerp .oe_kanban_action_button {
|
||||
height: 22px;
|
||||
margin: 0;
|
||||
@@ -212,4 +216,4 @@
|
||||
/* Alert color */
|
||||
.openerp .oe_kanban_color_alert .oe_kanban_color_border {
|
||||
border-color: #c00 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,9 +482,9 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
|
||||
group_name = group.value[1];
|
||||
group_value = group.value[0];
|
||||
}
|
||||
var group_aggregates = '';
|
||||
var group_aggregates = {};
|
||||
_.each(self.aggregates, function(value, key) {
|
||||
group_aggregates += value + ": " + group.aggregates[key];
|
||||
group_aggregates[value] = group.aggregates[key];
|
||||
});
|
||||
self.dataset.read_slice([], {'domain': group.domain, 'context': group.context}, function(records) {
|
||||
self.all_display_data.push({"value" : group_value, "records": records, 'header':group_name, 'ids': self.dataset.ids, 'aggregates': group_aggregates});
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td t-foreach="data" t-as="columns" class="oe_table_column oe_column_heading" t-att-id="'column_' + columns.value">
|
||||
<td t-foreach="data" t-as="columns" class="oe_table_column" t-att-id="'column_' + columns.value">
|
||||
<img t-att-id="columns.value" class="fold-columns-icon" src="/web_kanban/static/src/img/minus-icon.png"/>
|
||||
<div class="oe_fold_column" t-att-id="'column_' + columns.value">
|
||||
<div class="oe_fold_column oe_column_heading" t-att-id="'column_' + columns.value">
|
||||
<t t-if="columns.value and columns.header" t-esc="columns.header"/>
|
||||
<t t-if="columns.aggregates">
|
||||
<br/><t t-esc="columns.aggregates"/>
|
||||
</t>
|
||||
</div>
|
||||
<div t-foreach="columns.aggregates" t-as="aggregate">
|
||||
<i><u><t t-esc="aggregate"/>:</u> <t t-esc="aggregate_value"/></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user