diff --git a/web_graph_sort/README.rst b/web_graph_sort/README.rst index cfbfa110..f3f4a4c7 100644 --- a/web_graph_sort/README.rst +++ b/web_graph_sort/README.rst @@ -13,11 +13,18 @@ Usage To use this module, you need to: -#. Go to ... +#. Go to any pivot table. Click on a column header. The table will be sorted by that column. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/web/8.0 + :target: https://runbot.odoo-community.org/runbot/162/8.0 + +Known issues / Roadmap +====================== + +* The columns are sorted according to the sum over the row. If you have multiple +accounting periods for example, if you click on the column header of the first semester, +the rows will still be sorted by the total for the year. Bug Tracker =========== diff --git a/web_graph_sort/static/src/js/web_graph_sort.js b/web_graph_sort/static/src/js/web_graph_sort.js index 4419ae5f..0a7d46a2 100644 --- a/web_graph_sort/static/src/js/web_graph_sort.js +++ b/web_graph_sort/static/src/js/web_graph_sort.js @@ -69,7 +69,7 @@ openerp.web_graph_sort = function(instance) { var self = this; var result = this.model.query(_.without(fields, '__count')); if(this.sort !== null) { - result=result.order_by(this.sort); + result = result.order_by(this.sort); } return result.filter(domain) .context(this.context)