From cbe1e1be3f275e64796bfeece438fcfa0b45a443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 21 Jan 2009 14:20:42 +0100 Subject: [PATCH] Add id in order to select views --- trytond/osv/orm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 43a4c32182..c3f6edf3e1 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2298,7 +2298,7 @@ class ORM(object): 'inherit, model ' \ 'FROM ir_ui_view ' \ 'WHERE model = %s AND type = %s' \ - 'ORDER BY inherit DESC, priority', + 'ORDER BY inherit DESC, priority ASC, id ASC', (self._name, view_type)) sql_res = cursor.fetchone() if not sql_res: @@ -2326,7 +2326,7 @@ class ORM(object): cursor.execute('SELECT arch, domain, id FROM ir_ui_view ' \ 'WHERE (inherit = %s AND model = %s) OR ' \ ' (id = %s AND inherit IS NOT NULL) ' - 'ORDER BY priority', + 'ORDER BY priority ASC, id ASC', (inherit_id, self._name, inherit_id)) sql_inherit = cursor.fetchall() for (arch, domain, view_id) in sql_inherit: