diff --git a/project_recurrent_task/__init__.py b/project_recurrent_task/__init__.py new file mode 100644 index 000000000..3a5f9a400 --- /dev/null +++ b/project_recurrent_task/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import models + diff --git a/project_recurrent_task/__openerp__.py b/project_recurrent_task/__openerp__.py new file mode 100644 index 000000000..9394de1e9 --- /dev/null +++ b/project_recurrent_task/__openerp__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'Recurrent Task In Project', + 'version': '9.0.1.0.0', + 'summary': """Create Recurrent Task in Project""", + 'description': 'This module helps you to create recurrent task in project', + 'category': 'Project Management', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'depends': ['base', 'project', 'subscription'], + 'data': [ + 'demo/demo_data.xml', + 'views/recurrent_task_view.xml', + 'views/approve_recurrent_task_view.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'demo': [], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/project_recurrent_task/demo/demo_data.xml b/project_recurrent_task/demo/demo_data.xml new file mode 100644 index 000000000..200f0be08 --- /dev/null +++ b/project_recurrent_task/demo/demo_data.xml @@ -0,0 +1,9 @@ + + + + + Recurrent Task + + + + \ No newline at end of file diff --git a/project_recurrent_task/models/__init__.py b/project_recurrent_task/models/__init__.py new file mode 100644 index 000000000..12186ba34 --- /dev/null +++ b/project_recurrent_task/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import recurrent_task_wizard +import approve_recurrent_task + + diff --git a/project_recurrent_task/models/approve_recurrent_task.py b/project_recurrent_task/models/approve_recurrent_task.py new file mode 100644 index 000000000..de300b5b2 --- /dev/null +++ b/project_recurrent_task/models/approve_recurrent_task.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from openerp import models, fields, api, _ + + +class ApproveRecurrentTask(models.Model): + _name = 'approve.recurrent.task' + + task = fields.Many2one('project.task', string='Task') + project = fields.Many2one('project.project', string='Project') + user_id = fields.Many2one('res.users', string='Requested user') + team_lead = fields.Many2one('res.users', string='Team lead') + from_date = fields.Datetime(string='Start time') + interval_number = fields.Integer(string='Interval Qty') + interval_type = fields.Selection([('days', 'Days'), + ('weeks', 'Weeks'), + ('months', 'Months')], string='Interval Unit') + name = fields.Char(string='Name') + state = fields.Selection([ + ('waiting', 'Waiting For Approval '), + ('approved', 'Approved'), + ('rejected', 'Rejected'), + ], 'Status', readonly=True, default='waiting', select=True) + reason = fields.Text(string='Reason') + + @api.multi + def approve_recurrent_task(self): + doc_id = self.env.ref('project_recurrent_task.recurrent_document_22') + rec_inv_doc = self.env['subscription.subscription'] + rec_inv_doc_id = rec_inv_doc.create({'name': self.name + ' ' + 'Task', + 'interval_type': self.interval_type, + 'interval_number': self.interval_number, + 'doc_source': doc_id.model.model + ',' + str(self.task.id), + }) + rec_inv_doc_id.set_process() + self.state = 'approved' + + +class WizardReason(models.Model): + _name = 'wizard.reason' + + @api.multi + def send_reason(self): + context = self._context + approval_obj = self.env['approve.recurrent.task'].search([('id', '=', context.get('approval_id'))]) + approval_obj.write({'state': 'rejected', + 'reason': self.reason}) + + reason = fields.Text(string="Reason") diff --git a/project_recurrent_task/models/recurrent_task_wizard.py b/project_recurrent_task/models/recurrent_task_wizard.py new file mode 100644 index 000000000..19dae12f2 --- /dev/null +++ b/project_recurrent_task/models/recurrent_task_wizard.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from datetime import datetime +from openerp import models, fields, api, _ + + +class RecurrentTaskWizard(models.TransientModel): + _name = "wizard.recurrent.task" + _description = "Recurrent Task" + + name = fields.Char(string='Recurrent document name') + interval_number = fields.Integer(string='Interval Qty') + interval_type = fields.Selection([('days', 'Days'), + ('weeks', 'Weeks'), + ('months', 'Months')], string='Interval Unit') + + @api.multi + def create_recurrent_task(self): + obj = self.env['approve.recurrent.task'] + task_id = self.env['project.task'].browse(self._context.get('task_id')) + obj.create({ + 'task': task_id.id, + 'project': task_id.project_id.id, + 'user_id': self.env.user.id, + 'team_lead': task_id.project_id.user_id.id, + 'from_date': datetime.today(), + 'interval_number': self.interval_number, + 'interval_type': self.interval_type, + 'name': self.name + }) + + diff --git a/project_recurrent_task/static/description/banner.jpg b/project_recurrent_task/static/description/banner.jpg new file mode 100644 index 000000000..5a6a1160d Binary files /dev/null and b/project_recurrent_task/static/description/banner.jpg differ diff --git a/project_recurrent_task/static/description/cybro_logo.png b/project_recurrent_task/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/project_recurrent_task/static/description/cybro_logo.png differ diff --git a/project_recurrent_task/static/description/icon.png b/project_recurrent_task/static/description/icon.png new file mode 100644 index 000000000..2da889f0d Binary files /dev/null and b/project_recurrent_task/static/description/icon.png differ diff --git a/project_recurrent_task/static/description/index.html b/project_recurrent_task/static/description/index.html new file mode 100644 index 000000000..3b02c4764 --- /dev/null +++ b/project_recurrent_task/static/description/index.html @@ -0,0 +1,120 @@ +
+
+

Recurrent Task In Project

+

Create Recurrent Task in Project

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Create recurrent task in project.
  • +
  •    Send recurrent task request to team lead.
  • +
  •    Approve request by team lead
  • +
+
+
+
+ +
+
+

Create recurrent task in project

+
+
+
+ +
+
+
+

+ Users can send a request to corresponding project manager for creating recurrent task from task's form. +

+
+
+
+ +
+
+
+

+ Here users can give specific interval type and interval quantity for recurrence. +

+
+
+
+ +
+
+ +
+
+
+ +
+
+

Approve request by team lead

+
+
+
+ +
+
+
+

+

Project ---> Recurrent Task Requests ---> Recurrent Task Requests

+

Here current user can get recurrent task request. So he can approve request or reject + request with a reason. If he approve the request task will be recurrently created + according to the interval type and interval quantity.

+

+
+
+
+ +
+
+
+
+
+ +
+
+

My Requests

+
+
+
+ +
+
+
+

+

Project ---> Recurrent Task Requests ---> My Requests

+

Here current user can track their requests

+

+
+
+
+
+ +
+

Need Any Help?

+ +
diff --git a/project_recurrent_task/static/description/myreq.png b/project_recurrent_task/static/description/myreq.png new file mode 100644 index 000000000..3be8c0da8 Binary files /dev/null and b/project_recurrent_task/static/description/myreq.png differ diff --git a/project_recurrent_task/static/description/reason.png b/project_recurrent_task/static/description/reason.png new file mode 100644 index 000000000..7c23273db Binary files /dev/null and b/project_recurrent_task/static/description/reason.png differ diff --git a/project_recurrent_task/static/description/rec_task.png b/project_recurrent_task/static/description/rec_task.png new file mode 100644 index 000000000..796389f55 Binary files /dev/null and b/project_recurrent_task/static/description/rec_task.png differ diff --git a/project_recurrent_task/static/description/req.png b/project_recurrent_task/static/description/req.png new file mode 100644 index 000000000..65ca7830d Binary files /dev/null and b/project_recurrent_task/static/description/req.png differ diff --git a/project_recurrent_task/static/description/tasks.png b/project_recurrent_task/static/description/tasks.png new file mode 100644 index 000000000..232ee275a Binary files /dev/null and b/project_recurrent_task/static/description/tasks.png differ diff --git a/project_recurrent_task/static/description/wizard.png b/project_recurrent_task/static/description/wizard.png new file mode 100644 index 000000000..e07547354 Binary files /dev/null and b/project_recurrent_task/static/description/wizard.png differ diff --git a/project_recurrent_task/views/approve_recurrent_task_view.xml b/project_recurrent_task/views/approve_recurrent_task_view.xml new file mode 100644 index 000000000..2b2d25d00 --- /dev/null +++ b/project_recurrent_task/views/approve_recurrent_task_view.xml @@ -0,0 +1,145 @@ + + + + + wizard.reason.form + wizard.reason + +
+ + + +
+
+
+
+
+ + + Update Reason + wizard.reason + form + form + + new + + + + approve.recurrent.task.form + approve.recurrent.task + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+ + + approve.recurrent.task.form1 + approve.recurrent.task + +
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+
+
+ + + approve.recurrent.task.tree + approve.recurrent.task + + + + + + + + + + + + + Approve Recurrent Task + ir.actions.act_window + approve.recurrent.task + form + tree,form + [('team_lead','=', uid)] + + + + My Requests + ir.actions.act_window + approve.recurrent.task + form + tree,form + [('user_id','=', uid)] + + + + + form + + + + + + + tree + + + + + + + +
+
\ No newline at end of file diff --git a/project_recurrent_task/views/recurrent_task_view.xml b/project_recurrent_task/views/recurrent_task_view.xml new file mode 100644 index 000000000..75a7e9256 --- /dev/null +++ b/project_recurrent_task/views/recurrent_task_view.xml @@ -0,0 +1,50 @@ + + + + + wizard.recurrent.task.form + wizard.recurrent.task + +
+ + + + + + + + + +
+
+
+
+
+ + + Recurrent Task + wizard.recurrent.task + form + form + + new + + + + Task Form + project.task + + + +