Better order for stock moves

This commit is contained in:
Alexis de Lattre
2018-06-15 20:49:56 +02:00
parent 0dd436a2c8
commit 6100e65a8a

View File

@@ -199,6 +199,23 @@
</field> </field>
</record> </record>
<!-- By default, stock.move have:
_order = 'picking_id, sequence, id'
I don't know if they have a good reason to choose this order,
but, when you open tree view of move lines from product, you want
the most recent moves at the top, so we change the default
order in the tree view (lower impact than changing _order -->
<record id="view_move_tree" model="ir.ui.view">
<field name="name">stock_usability.move.tree.better.order</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_tree" />
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="default_order">date desc, picking_id, sequence</attribute>
</tree>
</field>
</record>
<record id="view_warehouse" model="ir.ui.view"> <record id="view_warehouse" model="ir.ui.view">
<field name="name">stock.usability.warehouse.form</field> <field name="name">stock.usability.warehouse.form</field>
<field name="model">stock.warehouse</field> <field name="model">stock.warehouse</field>