From 7ffbb8d142f66f06efba6e9d0dc9cc522ccdb18e Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 23 Feb 2015 16:05:41 +0100 Subject: [PATCH] [FIX] project: task count button & link The tasks list view "act_project_project_2_project_task_all" always displays inactive tasks ("'active_test': False" in context). Both the link in the kanban and the button in the form leading to this list view should therefore counts both inactive & active tasks. opw-628672 --- addons/project/project.py | 2 +- addons/project/project_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 7c25626c1fc..5e9f4b97200 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -188,7 +188,7 @@ class project(osv.osv): return res def _task_count(self, cr, uid, ids, field_name, arg, context=None): res={} - for tasks in self.browse(cr, uid, ids, context): + for tasks in self.browse(cr, uid, ids, dict(context, active_test=False)): res[tasks.id] = len(tasks.task_ids) return res def _get_alias_models(self, cr, uid, context=None): diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f1b039ac222..d33214e204a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -273,7 +273,7 @@
- Tasks + Tasks