在Odoo 10中,我们有自定义模块,其树视图定义如下:

<tree create="false" delete="false" default_order="write_date asc">

升级到odoo 11/12时,我们现在得到了

Uncaught TypeError: Cannot read property 'type' of undefined

删除default_order属性可以解决问题 .

但是如何在升级到odoo 12之前实现这个default_order呢?