mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
ADD security to project.task.line and show on website.
`website_project_task` module now includes optional template to display Todo List on the task view
This commit is contained in:
@@ -13,6 +13,7 @@ Adds "todo" lines onto Project Tasks, and improves sub-tasks.
|
|||||||
'project',
|
'project',
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
|
'security/ir.model.access.csv',
|
||||||
'views/project_views.xml',
|
'views/project_views.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ class ProjectTask(models.Model):
|
|||||||
def _compute_subtask_count(self):
|
def _compute_subtask_count(self):
|
||||||
for task in self:
|
for task in self:
|
||||||
task.subtask_count = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id)])
|
task.subtask_count = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id)])
|
||||||
task.subtask_count_done = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id), ('stage_id.fold', '=', True)])
|
if task.subtask_count:
|
||||||
|
task.subtask_count_done = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id),
|
||||||
|
('stage_id.fold', '=', True)])
|
||||||
|
else:
|
||||||
|
task.subtask_count_done = 0
|
||||||
|
|
||||||
|
|
||||||
class ProjectTaskLine(models.Model):
|
class ProjectTaskLine(models.Model):
|
||||||
|
|||||||
3
project_task_line/security/ir.model.access.csv
Normal file
3
project_task_line/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||||
|
"access_project_task_line","access_project_task_line","model_project_task_line","base.group_user",1,1,1,1
|
||||||
|
"access_project_task_line_public","access_project_task_line public","model_project_task_line","base.group_public",1,0,0,0
|
||||||
|
Reference in New Issue
Block a user