From d6d5a47ce2479ef0832156cf292eba230144a6b3 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 30 Oct 2018 08:29:47 -0700 Subject: [PATCH 01/15] Initial commit of `project_task_line` for 11.0 --- project_task_line/__init__.py | 1 + project_task_line/__manifest__.py | 20 +++++++++++ project_task_line/models/__init__.py | 1 + project_task_line/models/project.py | 39 +++++++++++++++++++++ project_task_line/views/project_views.xml | 42 +++++++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 project_task_line/__init__.py create mode 100644 project_task_line/__manifest__.py create mode 100644 project_task_line/models/__init__.py create mode 100644 project_task_line/models/project.py create mode 100644 project_task_line/views/project_views.xml diff --git a/project_task_line/__init__.py b/project_task_line/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/project_task_line/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py new file mode 100644 index 00000000..4be1731a --- /dev/null +++ b/project_task_line/__manifest__.py @@ -0,0 +1,20 @@ +{ + 'name': 'Project Task Lines', + 'version': '11.0.1.0.0', + 'author': 'Hibou Corp. ', + 'website': 'https://hibou.io/', + 'license': 'AGPL-3', + 'category': 'Tools', + 'complexity': 'easy', + 'description': """ +Adds "todo" lines onto Project Tasks, and improves sub-tasks. + """, + 'depends': [ + 'project', + ], + 'data': [ + 'views/project_views.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/project_task_line/models/__init__.py b/project_task_line/models/__init__.py new file mode 100644 index 00000000..351a3ad3 --- /dev/null +++ b/project_task_line/models/__init__.py @@ -0,0 +1 @@ +from . import project diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py new file mode 100644 index 00000000..a533fffb --- /dev/null +++ b/project_task_line/models/project.py @@ -0,0 +1,39 @@ +from odoo import api, fields, models + + +class ProjectTask(models.Model): + _inherit = 'project.task' + + line_ids = fields.One2many('project.task.line', 'task_id', string='Todo List') + subtask_count_done = fields.Integer(compute='_compute_subtask_count', string="Sub-task Done count") + + @api.multi + def _compute_subtask_count(self): + for task in self: + 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)]) + + +class ProjectTaskLine(models.Model): + _name = 'project.task.line' + _description = 'Task Todos' + _order = 'sequence, id desc' + + task_id = fields.Many2one('project.task', required=True) + name = fields.Char(string='Name') + user_id = fields.Many2one('res.users', string='User') + sequence = fields.Integer(string='Sequence') + kanban_state = fields.Selection([ + ('normal', 'Grey'), + ('done', 'Green'), + ('blocked', 'Red')], string='Kanban State', + copy=False, default='normal', required=True, + help="A task's kanban state indicates special situations affecting it:\n" + " * Grey is the default situation\n" + " * Red indicates something is preventing the progress of this task\n" + " * Green indicates the task is complete") + + @api.onchange('kanban_state') + def _onchange_kanban_state(self): + if self.kanban_state == 'done': + self.user_id = self.env.user diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml new file mode 100644 index 00000000..b47a5126 --- /dev/null +++ b/project_task_line/views/project_views.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + project.task.form.inherit + project.task + + + +
+ / + Sub-Tasks +
+
+ + + + + + + + + + + + +
+
+
\ No newline at end of file From d45e0ad15252bbed8ca79eb719e77ef7bbae77ce Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Sat, 3 Nov 2018 16:26:49 -0700 Subject: [PATCH 02/15] 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 --- project_task_line/__manifest__.py | 1 + project_task_line/models/project.py | 6 +++++- project_task_line/security/ir.model.access.csv | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 project_task_line/security/ir.model.access.csv diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 4be1731a..db352855 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -13,6 +13,7 @@ Adds "todo" lines onto Project Tasks, and improves sub-tasks. 'project', ], 'data': [ + 'security/ir.model.access.csv', 'views/project_views.xml', ], 'installable': True, diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index a533fffb..9f980c03 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -11,7 +11,11 @@ class ProjectTask(models.Model): def _compute_subtask_count(self): for task in self: 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): diff --git a/project_task_line/security/ir.model.access.csv b/project_task_line/security/ir.model.access.csv new file mode 100644 index 00000000..a4846d4f --- /dev/null +++ b/project_task_line/security/ir.model.access.csv @@ -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 \ No newline at end of file From 8b228d86bfd97212b72c7b261ba4127c5f614167 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Sat, 10 Nov 2018 07:55:03 -0800 Subject: [PATCH 03/15] IMP `project_task_line` More natural ordering when adding many lines at once. --- project_task_line/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 9f980c03..587e878b 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -21,7 +21,7 @@ class ProjectTask(models.Model): class ProjectTaskLine(models.Model): _name = 'project.task.line' _description = 'Task Todos' - _order = 'sequence, id desc' + _order = 'sequence, id asc' task_id = fields.Many2one('project.task', required=True) name = fields.Char(string='Name') From 46f244b8da0acbae620595784104ad4fddc42d64 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 13 Feb 2019 12:13:40 -0800 Subject: [PATCH 04/15] FIX Portal access for `project.task.line` --- project_task_line/views/project_views.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index b47a5126..4964eaa8 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -1,19 +1,5 @@ - - - - - - - - - - - - - - project.task.form.inherit project.task From 0ec0ce69f3a438292649c1ca40bd95874a74b39e Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Sat, 25 May 2019 16:47:51 -0600 Subject: [PATCH 05/15] MIG `project_task_line` to 12.0 --- project_task_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index db352855..315ab647 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', From d06cf1be7e77efa7bd5ecb4f53c15179478ffb46 Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Wed, 11 Sep 2019 18:21:02 -0400 Subject: [PATCH 06/15] MIG `project_task_line` For Odoo 13.0 --- project_task_line/__manifest__.py | 2 +- project_task_line/models/project.py | 1 - project_task_line/views/project_views.xml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 315ab647..17df456e 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 587e878b..0d0f4ab7 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -7,7 +7,6 @@ class ProjectTask(models.Model): line_ids = fields.One2many('project.task.line', 'task_id', string='Todo List') subtask_count_done = fields.Integer(compute='_compute_subtask_count', string="Sub-task Done count") - @api.multi def _compute_subtask_count(self): for task in self: task.subtask_count = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id)]) diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index 4964eaa8..c027cabd 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -14,7 +14,7 @@ - + From 32d79d96fc24eaedf63b26bbe4e658b5fdcb32e3 Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Wed, 11 Sep 2019 22:07:29 -0400 Subject: [PATCH 07/15] IMP `project_task_line` Set Default task on Todo lines. --- project_task_line/views/project_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index c027cabd..81bdf9a5 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -13,7 +13,7 @@ - + From 8245f25e93a69562ccd2739f717a6ca81d2722a3 Mon Sep 17 00:00:00 2001 From: Connor Christian Date: Tue, 17 Nov 2020 13:06:02 -0500 Subject: [PATCH 08/15] [IMP] project_task_line: make inline tree editable and update kanban states H4497 --- project_task_line/models/project.py | 12 ++++++------ project_task_line/views/project_views.xml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 0d0f4ab7..3305de57 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -27,14 +27,14 @@ class ProjectTaskLine(models.Model): user_id = fields.Many2one('res.users', string='User') sequence = fields.Integer(string='Sequence') kanban_state = fields.Selection([ - ('normal', 'Grey'), - ('done', 'Green'), - ('blocked', 'Red')], string='Kanban State', + ('normal', ''), + ('done', 'Done'), + ('blocked', 'Blocked')], string='State', copy=False, default='normal', required=True, help="A task's kanban state indicates special situations affecting it:\n" - " * Grey is the default situation\n" - " * Red indicates something is preventing the progress of this task\n" - " * Green indicates the task is complete") + " * Blank is the default situation\n" + " * Blocked indicates something is preventing the progress of this task\n" + " * Doen indicates the task is complete") @api.onchange('kanban_state') def _onchange_kanban_state(self): diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index 81bdf9a5..bf255704 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -14,10 +14,10 @@ - + - + From 7d47bb242cdaa3b117b9d2d21645c7c04d9da1ef Mon Sep 17 00:00:00 2001 From: Connor Christian Date: Tue, 17 Nov 2020 13:55:03 -0500 Subject: [PATCH 09/15] [MIG] project_task_line: for Odoo 14.0 --- project_task_line/__manifest__.py | 2 +- project_task_line/models/project.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 17df456e..b9ab9cac 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '13.0.1.0.0', + 'version': '14.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 3305de57..d0170a57 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -34,7 +34,7 @@ class ProjectTaskLine(models.Model): help="A task's kanban state indicates special situations affecting it:\n" " * Blank is the default situation\n" " * Blocked indicates something is preventing the progress of this task\n" - " * Doen indicates the task is complete") + " * Done indicates the task is complete") @api.onchange('kanban_state') def _onchange_kanban_state(self): From 315b73ce3d4bf6917351c19e31f181381e2ecab9 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Thu, 6 Jan 2022 09:31:28 -0800 Subject: [PATCH 10/15] [MIG] project_task_line: to 15.0 Re-implement the subtasks smartbutton and action. --- project_task_line/__manifest__.py | 2 +- project_task_line/models/project.py | 28 ++++++++++++++++++----- project_task_line/views/project_views.xml | 6 ++--- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index b9ab9cac..306dba71 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '14.0.1.0.0', + 'version': '15.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index d0170a57..91c1534f 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -7,14 +7,30 @@ class ProjectTask(models.Model): line_ids = fields.One2many('project.task.line', 'task_id', string='Todo List') subtask_count_done = fields.Integer(compute='_compute_subtask_count', string="Sub-task Done count") + @api.depends('child_ids') def _compute_subtask_count(self): for task in self: - task.subtask_count = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id)]) - 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 + subtasks = task._get_all_subtasks() + task.subtask_count = len(subtasks) + task.subtask_count_done = len(subtasks.filtered(lambda t: t.stage_id.is_closed)) + + def action_subtask(self): + action = self.env.ref('project.action_view_all_task').read()[0] + + # display all subtasks of current task + action['domain'] = [('id', 'child_of', self.id), ('id', '!=', self.id)] + + ctx = dict(self.env.context) + ctx = {k: v for k, v in ctx.items() if not k.startswith('search_default_')} + ctx.update({ + 'default_name': self.env.context.get('name', self.name) + ':', + 'default_parent_id': self.id, # will give default subtask field in `default_get` + 'default_company_id': self.env.company.id, + }) + + action['context'] = ctx + + return action class ProjectTaskLine(models.Model): diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index bf255704..c7614426 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -5,11 +5,11 @@ project.task - -
+ +
+
From 54b5d5728df705038d67689329304320b407591f Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Mon, 10 Jan 2022 08:39:15 -0800 Subject: [PATCH 11/15] [FIX] project_task_line: access error on action for low level users --- project_task_line/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 91c1534f..887f53ab 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -15,7 +15,7 @@ class ProjectTask(models.Model): task.subtask_count_done = len(subtasks.filtered(lambda t: t.stage_id.is_closed)) def action_subtask(self): - action = self.env.ref('project.action_view_all_task').read()[0] + action = self.env.ref('project.action_view_all_task').sudo().read()[0] # display all subtasks of current task action['domain'] = [('id', 'child_of', self.id), ('id', '!=', self.id)] From 160022949b0953c378d4839a830e541ff9663deb Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Fri, 21 Oct 2022 22:58:25 +0000 Subject: [PATCH 12/15] [MIG] project_task_line: to 16 --- project_task_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 306dba71..d8023b12 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', From 26f3a3408de61d7b270807601c2442fc7a33e8b6 Mon Sep 17 00:00:00 2001 From: Cedric Collins Date: Mon, 13 Nov 2023 16:16:13 -0600 Subject: [PATCH 13/15] [FIX] project_task_line: invalid reference in computed field --- project_task_line/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 887f53ab..3557f69c 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -12,7 +12,7 @@ class ProjectTask(models.Model): for task in self: subtasks = task._get_all_subtasks() task.subtask_count = len(subtasks) - task.subtask_count_done = len(subtasks.filtered(lambda t: t.stage_id.is_closed)) + task.subtask_count_done = len(subtasks.filtered(lambda t: t.is_closed)) def action_subtask(self): action = self.env.ref('project.action_view_all_task').sudo().read()[0] From 36bfe3e7263fc6e29a473977179a2bdee882a8b8 Mon Sep 17 00:00:00 2001 From: Cedric Collins Date: Mon, 13 Nov 2023 18:30:31 -0600 Subject: [PATCH 14/15] [MIG] project_task_line: 17.0 --- project_task_line/__manifest__.py | 2 +- .../migrations/17.0.1.0.0/pre-migration.py | 14 +++++ project_task_line/models/project.py | 52 +++++-------------- project_task_line/views/project_views.xml | 15 +++--- 4 files changed, 34 insertions(+), 49 deletions(-) create mode 100644 project_task_line/migrations/17.0.1.0.0/pre-migration.py diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index d8023b12..6db1ed20 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '16.0.1.0.0', + 'version': '17.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', diff --git a/project_task_line/migrations/17.0.1.0.0/pre-migration.py b/project_task_line/migrations/17.0.1.0.0/pre-migration.py new file mode 100644 index 00000000..85d8bd0c --- /dev/null +++ b/project_task_line/migrations/17.0.1.0.0/pre-migration.py @@ -0,0 +1,14 @@ +def migrate(cr, installed_version): + cr.execute( + """ + ALTER TABLE project_task_line + ADD COLUMN IF NOT EXISTS state VARCHAR + """, + ) + cr.execute( + """ + UPDATE project_task_line + SET state = kanban_state + WHERE kanban_state IN ('done', 'blocked') + """, + ) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 3557f69c..1a467a7f 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -5,32 +5,6 @@ class ProjectTask(models.Model): _inherit = 'project.task' line_ids = fields.One2many('project.task.line', 'task_id', string='Todo List') - subtask_count_done = fields.Integer(compute='_compute_subtask_count', string="Sub-task Done count") - - @api.depends('child_ids') - def _compute_subtask_count(self): - for task in self: - subtasks = task._get_all_subtasks() - task.subtask_count = len(subtasks) - task.subtask_count_done = len(subtasks.filtered(lambda t: t.is_closed)) - - def action_subtask(self): - action = self.env.ref('project.action_view_all_task').sudo().read()[0] - - # display all subtasks of current task - action['domain'] = [('id', 'child_of', self.id), ('id', '!=', self.id)] - - ctx = dict(self.env.context) - ctx = {k: v for k, v in ctx.items() if not k.startswith('search_default_')} - ctx.update({ - 'default_name': self.env.context.get('name', self.name) + ':', - 'default_parent_id': self.id, # will give default subtask field in `default_get` - 'default_company_id': self.env.company.id, - }) - - action['context'] = ctx - - return action class ProjectTaskLine(models.Model): @@ -40,19 +14,19 @@ class ProjectTaskLine(models.Model): task_id = fields.Many2one('project.task', required=True) name = fields.Char(string='Name') - user_id = fields.Many2one('res.users', string='User') + user_id = fields.Many2one( + 'res.users', string='Completed By', + context={'active_test': False}, + compute='_compute_user_id', + store=True, readonly=False, precompute=True, + ) sequence = fields.Integer(string='Sequence') - kanban_state = fields.Selection([ - ('normal', ''), + state = fields.Selection([ ('done', 'Done'), - ('blocked', 'Blocked')], string='State', - copy=False, default='normal', required=True, - help="A task's kanban state indicates special situations affecting it:\n" - " * Blank is the default situation\n" - " * Blocked indicates something is preventing the progress of this task\n" - " * Done indicates the task is complete") + ('blocked', 'Blocked'), + ], string='State', copy=False) - @api.onchange('kanban_state') - def _onchange_kanban_state(self): - if self.kanban_state == 'done': - self.user_id = self.env.user + @api.depends('state') + def _compute_user_id(self): + for line in self.filtered(lambda l: l.state == 'done' and not l.user_id): + line.user_id = self.env.user diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index c7614426..8df89a1f 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -5,24 +5,21 @@ project.task - - + + {'default_name': name + ':', 'default_user_ids': user_ids, 'default_project_id': project_id, 'default_milestone_id': milestone_id, 'subtask_action': True} - + - - + +
-
\ No newline at end of file + From 535112b3c52a5ffda6852f786709081d146594c9 Mon Sep 17 00:00:00 2001 From: Mayank Patel Date: Thu, 24 Oct 2024 14:53:35 +0000 Subject: [PATCH 15/15] [MIG] project_task_line: Migrated to 18.0 H14631 --- project_task_line/__manifest__.py | 2 +- .../migrations/17.0.1.0.0/pre-migration.py | 14 -------------- project_task_line/views/project_views.xml | 6 +++--- 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 project_task_line/migrations/17.0.1.0.0/pre-migration.py diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 6db1ed20..a1346f22 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '17.0.1.0.0', + 'version': '18.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', diff --git a/project_task_line/migrations/17.0.1.0.0/pre-migration.py b/project_task_line/migrations/17.0.1.0.0/pre-migration.py deleted file mode 100644 index 85d8bd0c..00000000 --- a/project_task_line/migrations/17.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,14 +0,0 @@ -def migrate(cr, installed_version): - cr.execute( - """ - ALTER TABLE project_task_line - ADD COLUMN IF NOT EXISTS state VARCHAR - """, - ) - cr.execute( - """ - UPDATE project_task_line - SET state = kanban_state - WHERE kanban_state IN ('done', 'blocked') - """, - ) diff --git a/project_task_line/views/project_views.xml b/project_task_line/views/project_views.xml index 8df89a1f..870f815e 100644 --- a/project_task_line/views/project_views.xml +++ b/project_task_line/views/project_views.xml @@ -10,13 +10,13 @@ - - + + - +