From 940bbdb18c045bf0626037ef41aa417c3f693655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 2 Jan 2015 15:49:24 +0100 Subject: [PATCH] Redefine _order instead of duplicate order on id issue3439 review14831002 --- invoice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index a6322010d4..6b87ac7755 100644 --- a/invoice.py +++ b/invoice.py @@ -186,8 +186,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): super(Invoice, cls).__setup__() cls._check_modify_exclude = ['state', 'payment_lines', 'cancel_move', 'invoice_report_cache', 'invoice_report_format'] - cls._order.insert(0, ('number', 'DESC')) - cls._order.insert(1, ('id', 'DESC')) + cls._order = [ + ('number', 'DESC'), + ('id', 'DESC'), + ] cls._error_messages.update({ 'missing_tax_line': ('Invoice "%s" has taxes defined but not ' 'on invoice lines.\nRe-compute the invoice.'),