From cdd839d29ccb96ed5b4abc009bd782b44e19519c Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Wed, 15 Mar 2017 11:20:03 +0100 Subject: [PATCH] [FIX] lunch: display most recent line on top Because when I want to edit my order of the day, I do want to see the last order I made on top of the list. --- addons/lunch/models/lunch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/lunch/models/lunch.py b/addons/lunch/models/lunch.py index e175aae3d44..e677b1506cc 100644 --- a/addons/lunch/models/lunch.py +++ b/addons/lunch/models/lunch.py @@ -157,6 +157,7 @@ class LunchOrder(models.Model): class LunchOrderLine(models.Model): _name = 'lunch.order.line' _description = 'lunch order line' + _order = 'date desc' name = fields.Char(related='product_id.name', string="Product Name", readonly=True) order_id = fields.Many2one('lunch.order', 'Order', ondelete='cascade', required=True)