I want to order my Sales Order and Quotations screens by Customer (versus by Order Number).
Is it possible to make such a change without creating a custom module? For example by editing the action (using the developer mode)? I see that I can easily change the default amount of items shown (limit = 80), but I can't find how to change the default sorting order.
I managed to add an extra field (untaxed amount) to the view by editing the TreeView XML and I would assume it would be possible to change the default sorting in a similar way.
Since odoo 8, you can add tag "default_order" to tree view in xml. The syntax is the same as _order:
<tree string="Foo" default_order="bar,fix desc"> ...
you can also make a custom view and inherit the desired view so it will be update safe:
<tree string="Foo" position ="attributes">
<attribute name="default_sort">bar,fix desc</attribute>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/19/14, 11:50 AM|
|Seen: 2110 times|
|Last updated: 12/8/15, 6:26 AM|