diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index d28cbc1..dff23db 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -330,6 +330,8 @@ class InheritProjectTask(models.Model): start_date = fields.Date(string='Start Date') - # def action_done_task(self): - # print('88888888888888') + def action_done_task(self): + stage_id = self.env['project.task.type'].search([('is_closed', '=', True)], limit=1) + for stage in self: + stage.write({'stage_id' : stage_id.id}) diff --git a/cor_custom/views/analytic_view.xml b/cor_custom/views/analytic_view.xml index f593883..8160eb9 100755 --- a/cor_custom/views/analytic_view.xml +++ b/cor_custom/views/analytic_view.xml @@ -57,7 +57,7 @@ - + - + diff --git a/cor_custom/views/project_view.xml b/cor_custom/views/project_view.xml index dbd0721..e016fd7 100755 --- a/cor_custom/views/project_view.xml +++ b/cor_custom/views/project_view.xml @@ -235,16 +235,16 @@ - + if records: + action = records.action_done_task() + +