I'm using odoo12 community,and in model muk_dms tree view I have
xml code:
<record id="view_dms_file_tree" model="ir.ui.view"> <field name="name">muk_dms_file.tree</field> <field name="model">muk_dms.file</field> <field name="arch" type="xml"> <tree string="Files" js_class="file_list" decoration-warning="not active" decoration-muted="(is_locked and not is_lock_editor)" import="false"> <field name="active" invisible="1"/> <field name="is_locked" invisible="1"/> <field name="is_lock_editor" invisible="1"/> <field name="name" /> <field name="data_info"/> <field name="create_date"/> <field name="write_date" invisible="1" /> <field name="size" widget="binary_size" /> <field name="mimetype" invisible="1"/> <field name="path_names" widget="path_names" string="Path" invisible="1" /> </tree> </field> </record>
I added the field "create_date" in tree view,but after updating code,I found this tree view
can't be ordered by create_date;at the same time,it can't be ordered by name or size.
Then I tried to use code:
<tree default_order="create_date desc" >
</tree>
but it still doesn't work.