我怎样才能以最近的第一个的方式自动显示交货单?
How can i display the delivery orders automatically in a way that the most recent is the first?
我正在使用 odoo 9,我想以最后一个(最近的)第一个自动显示的方式显示送货单。我试图应用过滤器来执行此命令,但没有解决方案。我找到的唯一解决方案是按字段日期,以便最后创建的交付显示为第一个。有没有一种解决方案可以自动执行此操作,特别是销售订单以这种方式显示?有什么帮助吗?
只需继承stock.picking
对象,添加"_order"属性(order by create_date降序)
_order = "create_date desc, priority desc, date asc, id desc"
这将首先显示最近创建的交货订单
class Picking(models.Model):
_inherit = "stock.picking"
_description = "Transfer"
_order = "create_date desc, priority desc, date asc, id desc"
我正在使用 odoo 9,我想以最后一个(最近的)第一个自动显示的方式显示送货单。我试图应用过滤器来执行此命令,但没有解决方案。我找到的唯一解决方案是按字段日期,以便最后创建的交付显示为第一个。有没有一种解决方案可以自动执行此操作,特别是销售订单以这种方式显示?有什么帮助吗?
只需继承stock.picking
对象,添加"_order"属性(order by create_date降序)
_order = "create_date desc, priority desc, date asc, id desc"
这将首先显示最近创建的交货订单
class Picking(models.Model):
_inherit = "stock.picking"
_description = "Transfer"
_order = "create_date desc, priority desc, date asc, id desc"