From b6accd6edd3e65f3bd9c55fe92ccb40fe231f6cb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 27 Mar 2017 14:15:43 +0200 Subject: [PATCH] account_usability: Fix _order on account.move.line --- account_usability/account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/account_usability/account.py b/account_usability/account.py index 5aaad72..8ebf142 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -160,6 +160,12 @@ class AccountMove(models.Model): class AccountMoveLine(models.Model): _inherit = 'account.move.line' + # Native order: + # _order = "date desc, id desc" + # Problem: when you manually create a journal entry, the + # order of the lines is inverted when you save ! It is quite annoying for + # the user... + _order = "date desc, id asc" # Update field only to add a string (there is no string in account module) invoice_id = fields.Many2one(string='Invoice')