From 742c81e1ffc0ea71e8b6937d2fc5cce1fa9c6289 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 30 Aug 2016 11:18:17 +0200 Subject: [PATCH] [FIX] project: default order of task type Before this patch, the order of a project's task type (its columns) were defined by a sequence. However, when you quick-create columns, they have the same sequence value: 1 by default. This results in weird behavior when you edit a task type (for example, by changing its tooltips), the column is moved at the end. By ordering by sequence and id, the behavior is more intuitive as the colum doesn't move when you edit it. --- addons/project/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 5e7d4989be0..30f32152851 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -11,7 +11,7 @@ from odoo.tools.safe_eval import safe_eval class ProjectTaskType(models.Model): _name = 'project.task.type' _description = 'Task Stage' - _order = 'sequence' + _order = 'sequence, id' def _get_mail_template_id_domain(self): return [('model', '=', 'project.task')]