[FIX] web: fixes issues with custom filters and search view
authorGéry Debongnie <ged@odoo.com>
Tue, 9 Sep 2014 10:26:16 +0000 (12:26 +0200)
committerMartin Trigaux <mat@openerp.com>
Mon, 15 Sep 2014 07:52:34 +0000 (09:52 +0200)
commit22b1f5ce0c19b11c96dbd36b3b2c2104ef4d79d0
tree6507d7e3a6e6dfd930beeac12e4d4ee800c56220
parentec0b770ed3c4f4fbdf0f24930aaa05bcc5cb0b53
[FIX] web: fixes issues with custom filters and search view

The problem was that when the user manipulates the graph view (in pivot
table mode), the graph view resetted the group by facet in the search
view.  It was not a problem unless a custom filter with a groupby was
already there, in which case, the group bys were duplicated.

The search view is now smarter, it only resets the additional groupbys
(and col_groupbys).   Also, to prevent usability problems, the graph
view disable the '+/-' groupbys added by a custom filters.

Note that this fix is only temporary: a revamp of custom filters, facets,
search view is coming in the next months. (at least, that's the idea). Right
now, too much 'search logic' is in the graph view.

Another note: this fix is somewhat fragile: it makes some assumptions
about the search query (mainly that the custom filter is the first facet,
also, that no other filters add groupbys/col_groupbys)
addons/web/static/src/js/pyeval.js
addons/web_graph/static/src/js/graph_view.js
addons/web_graph/static/src/js/graph_widget.js