[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
This commit is contained in:
Denis Ledoux 2015-02-23 16:05:41 +01:00
parent 5ec8596f67
commit 7ffbb8d142
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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">