notable: disable the group by integration in graph view, because of crash (the search view was rewritten and too much search logic was in the graph view. This is a temporary measure, the graph view will be split into pivot/graph views, and the search integration will be done correctly in the near future.
this.widget_config.measures = measures;
}
this.graph_widget = new openerp.web_graph.Graph(this, this.model, domain, this.widget_config);
- this.graph_widget.appendTo(this.$el);
- this.ViewManager.on('switch_mode', this, function (e) {
- if (e === 'graph') {
- var group_bys = self.get_groupbys_from_searchview();
- this.graph_widget.set(domain, group_bys.group_by, group_bys.col_group_by, group_bys.measures);
- }
+ this.graph_widget.appendTo(this.$el).done(function () {
+
});
return;
}
return {
category:'GroupBy',
values: this.make_groupby_values(groupbys, 'group_by'),
- icon:'w',
+ icon:'fa fa-bars',
field: this.search_view._s_groupby
};
},
return {
category:'ColGroupBy',
values: this.make_groupby_values(groupbys, 'col_group_by'),
- icon:'f',
+ icon:'fa fa-bars fa-rotate-90',
field: this.col_search_field
};
},
// this method gets the fields that appear in the search view, under the
// 'Groupby' heading
get_search_fields: function () {
+ return [];
var self = this;
var groupbygroups = _(this.search_view.drawer.inputs).select(function (g) {
this.currently_dragging = {};
this.limit = options.limit || 40;
this.add_group_mutex = new $.Mutex();
+ if (!this.options.$buttons.length) {
+ this.options.$buttons = false;
+ }
},
view_loading: function(r) {
return this.load_kanban(r);
if (unsorted && default_order) {
this.dataset.set_sort(default_order.split(','));
}
-
this.$el.addClass(this.fields_view.arch.attrs['class']);
this.$buttons = $(QWeb.render("KanbanView.buttons", {'widget': this}));
if (this.options.$buttons) {
this.$buttons.appendTo(this.options.$buttons);
} else {
- this.$el.find('.oe_kanban_buttons').replaceWith(this.$buttons);
+ this.$('.oe_kanban_buttons').replaceWith(this.$buttons);
}
this.$buttons
.on('click', 'button.oe_kanban_button_new', this.do_add_record)
},
do_show: function() {
- if (this.$buttons) {
+ if (this.options.$buttons) {
this.$buttons.show();
}
this.do_push_state({});
<div t-name="KanbanView.buttons" class="oe_kanban_buttons">
<t t-if="widget.options.action_buttons !== false">
<t t-if="widget.is_action_enabled('create')">
- <button type="button" class="oe_kanban_button_new btn btn-primary">
+ <button type="button" class="oe_kanban_button_new btn btn-primary btn-sm">
<t t-esc="widget.options.create_text || _t('Create')"/>
</button>
<span t-if="widget.is_action_enabled('group_create')" class="oe_alternative" style="display: none">