diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-02-23 16:05:41 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-02-23 16:08:42 +0100 |
| commit | 7ffbb8d142f66f06efba6e9d0dc9cc522ccdb18e (patch) | |
| tree | 04cde8bbc8e6c7e4fdd61b0b494237c2834d2bbd | |
| parent | 5ec8596f67990a52fb3427f31d86a5f2f36bc801 (diff) | |
[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
| -rw-r--r-- | addons/project/project.py | 2 | ||||
| -rw-r--r-- | 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 @@ </div> <div class="oe_kanban_project_list"> <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> - <t t-raw="record.task_ids.raw_value.length"/> Tasks + <t t-raw="record.task_count.raw_value"/> Tasks </a> </div> <div class="oe_kanban_project_list"> |
