[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.
This commit is contained in:
Richard Mathot
2017-03-15 11:20:03 +01:00
parent d0fbe51aa0
commit cdd839d29c
+1
View File
@@ -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)