diff --git a/project_scrum_report/__init__.py b/project_scrum_report/__init__.py new file mode 100644 index 000000000..72d4ef439 --- /dev/null +++ b/project_scrum_report/__init__.py @@ -0,0 +1,25 @@ +# -*- 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_scrum_report/__openerp__.py b/project_scrum_report/__openerp__.py new file mode 100644 index 000000000..59c42c794 --- /dev/null +++ b/project_scrum_report/__openerp__.py @@ -0,0 +1,46 @@ +# -*- 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': 'Scrum Plan & Report in Project', + 'version': '9.0.2.0.0', + 'summary': """Implementation of Scrum Plan and Scrum Report in Project""", + 'description': 'This module helps you to track scrum plan and scrum report', + 'category': 'Project Management', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'depends': ['base', 'project', 'mail'], + 'data': [ + 'security/ir.model.access.csv', + 'views/project_scrum_view.xml', + 'views/scrum_plan_view.xml', + 'views/scrum_report_view.xml', + 'reports/project_scrum_report.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'demo': [], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/project_scrum_report/models/__init__.py b/project_scrum_report/models/__init__.py new file mode 100644 index 000000000..f572bbcbb --- /dev/null +++ b/project_scrum_report/models/__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 project_scrum + diff --git a/project_scrum_report/models/project_scrum.py b/project_scrum_report/models/project_scrum.py new file mode 100644 index 000000000..1b3620954 --- /dev/null +++ b/project_scrum_report/models/project_scrum.py @@ -0,0 +1,145 @@ +# -*- 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, api, fields, _ + + +class ProjectScrum(models.Model): + _name = 'project.scrum' + + name = fields.Char(string='Scrum Code') + user_id = fields.Many2one('res.users', string='User') + date = fields.Date(string='Date') + scrum_plan = fields.One2many('scrum.plan', 'scrum_plan_obj', string='Scrum Plan') + scrum_report = fields.One2many('scrum.report', 'scrum_report_obj', string='Scrum Report') + state = fields.Selection([('plan', 'Scrum Plan'), + ('working', 'Working'), + ('report', 'Scrum Report'), + ('done', 'Done')], string='State', default='plan', readonly=1) + + _sql_constraints = [('scrum_unique', 'unique(user_id, date)', 'A user can only have one Scrum with same date')] + _defaults = { + 'user_id': lambda obj, cr, uid, context: uid, + 'date': lambda *a: datetime.now().strftime('%Y-%m-%d') + } + + @api.multi + def create_scrum_report(self): + scrum_report_obj = self.env['scrum.report'] + for each in self.scrum_plan: + scrum_report_obj.create({'task': each.task.id, + 'project': each.project.id, + 'scrum_report_obj': each.scrum_plan_obj.id, + 'worked_hrs': each.planned_hrs, + 'remarks': each.remarks, + 'date': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), + 'status': each.status + }) + self.state = 'report' + + @api.model + def create(self, vals): + result = super(ProjectScrum, self).create(vals) + result['name'] = 'Scrum_' + result['date'] + '_' + result['user_id'].name + result['state'] = 'working' + return result + + @api.multi + def send(self): + email_from = self.env['mail.message']._get_default_from() + partner_ids = [3] + mail_content = "Hi sir,
Please go through the work report of today.

" + mail_content += "" \ + "" \ + "" + count = 1 + for each in self.scrum_report: + if each.project.user_id.partner_id.id not in partner_ids: + partner_ids.append(each.project.user_id.partner_id.id) + mail_content += "" \ + "" \ + ""\ + % (count, each.task.name, each.project.name, each.worked_hrs, + dict(self.env['scrum.report'].fields_get(['status'])['status']['selection'])[each.status] + , each.remarks) + + count += 1 + + mail_content += "
SI NOTASKPROJECTWORKED HOURSSTATUSREMARKS" \ + "
%s%s%s%s%s%s
" + message = self.env['mail.message'].create({ + 'subject': _('Daily Work Report_%s_%s') % (self.date, self.user_id.name), + 'body': mail_content, + 'email_from': email_from, + 'reply_to': self.user_id.email, + 'no_auto_thread': True, + 'model': 'project.scrum' + }) + message.write({'needaction_partner_ids': [(4, pid) for pid in partner_ids]}) + message.write({'partner_ids': [(4, pid) for pid in partner_ids]}) + admin_partner = self.env['res.partner'].browse(3) + main_content1 = { + 'subject': _('Daily Work Report_%s_%s') % (self.date, self.user_id.name), + 'author_id': self.user_id.partner_id.id, + 'body_html': mail_content, + 'email_to': admin_partner.email, + + } + self.env['mail.mail'].create(main_content1).send() + self.state = 'done' + + +class ScrumPlan(models.Model): + _name = 'scrum.plan' + + name = fields.Char(string='Scrum Code', related='scrum_plan_obj.name', store=1) + user_id = fields.Many2one('res.users', string='User', related='scrum_plan_obj.user_id', store=1) + project_manager = fields.Many2one('res.users', related='project.user_id', store=1) + date = fields.Datetime(string='Date', store=1, default=datetime.now().strftime('%Y-%m-%d %H:%M:%S')) + task = fields.Many2one('project.task', string='Task', required=1) + project = fields.Many2one('project.project', string='Project', related='task.project_id') + status = fields.Selection([('scheduled', 'Scheduled'), + ('on_going', 'On going'), + ('halted', 'Halted'), + ], required=1, string='Status') + remarks = fields.Text(string='Remarks', required=1) + planned_hrs = fields.Float(string='Planned Hours', required=1) + scrum_plan_obj = fields.Many2one('project.scrum', invisible=1) + + +class ScrumReport(models.Model): + _name = 'scrum.report' + + project_manager = fields.Many2one('res.users', related='project.user_id', store=1) + name = fields.Char(string='Scrum Code', related='scrum_report_obj.name', store=1) + user_id = fields.Many2one('res.users', string='User', related='scrum_report_obj.user_id', store=1) + date = fields.Datetime(string='Date', store=1) + task = fields.Many2one('project.task', string='Task', required=1) + project = fields.Many2one('project.project', string='Project', related='task.project_id') + status = fields.Selection([('scheduled', 'Scheduled'), + ('on_going', 'On going'), + ('halted', 'Halted'), + ('completed', 'Completed')], required=1, string='Status') + remarks = fields.Text(string='Remarks', required=1) + worked_hrs = fields.Float(string='Worked Hours', required=1) + scrum_report_obj = fields.Many2one('project.scrum', invisible=1) diff --git a/project_scrum_report/reports/project_scrum_report.xml b/project_scrum_report/reports/project_scrum_report.xml new file mode 100644 index 000000000..755c0c200 --- /dev/null +++ b/project_scrum_report/reports/project_scrum_report.xml @@ -0,0 +1,117 @@ + + + + + + + + diff --git a/project_scrum_report/security/ir.model.access.csv b/project_scrum_report/security/ir.model.access.csv new file mode 100644 index 000000000..ef63cc060 --- /dev/null +++ b/project_scrum_report/security/ir.model.access.csv @@ -0,0 +1,11 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_scrum_plan_user,scrum.plan.user,model_scrum_plan,base.group_user,1,0,0,0 +access_scrum_plan_project_user,scrum.plan.project.user,model_scrum_plan,project.group_project_user,1,1,1,1 +access_scrum_plan_manager,scrum.plan.manager,model_scrum_plan,project.group_project_manager,1,0,0,0 +access_scrum_report_user,scrum.report.user,model_scrum_report,base.group_user,1,0,0,0 +access_scrum_report_project_user,scrum.report.project.user,model_scrum_report,project.group_project_user,1,1,1,1 +access_scrum_report_manager,scrum.report.manager,model_scrum_report,project.group_project_manager,1,0,0,0 +access_project_scrum_user,project.scrum.user,model_project_scrum,base.group_user,1,0,0,0 +access_project_scrum_project_user,project.scrum.project.user,model_project_scrum,project.group_project_user,1,1,1,1 +access_project_scrum_manager,project.scrum.manager,model_project_scrum,project.group_project_manager,1,1,1,1 + diff --git a/project_scrum_report/static/description/banner.jpg b/project_scrum_report/static/description/banner.jpg new file mode 100644 index 000000000..42cb06933 Binary files /dev/null and b/project_scrum_report/static/description/banner.jpg differ diff --git a/project_scrum_report/static/description/cybro_logo.png b/project_scrum_report/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/project_scrum_report/static/description/cybro_logo.png differ diff --git a/project_scrum_report/static/description/email.png b/project_scrum_report/static/description/email.png new file mode 100644 index 000000000..3507b7dd6 Binary files /dev/null and b/project_scrum_report/static/description/email.png differ diff --git a/project_scrum_report/static/description/icon.png b/project_scrum_report/static/description/icon.png new file mode 100644 index 000000000..cbab640b2 Binary files /dev/null and b/project_scrum_report/static/description/icon.png differ diff --git a/project_scrum_report/static/description/index.html b/project_scrum_report/static/description/index.html new file mode 100644 index 000000000..bf9f88b74 --- /dev/null +++ b/project_scrum_report/static/description/index.html @@ -0,0 +1,183 @@ +
+
+

Scrum Plan & Report in Project

+

Implementation of Scrum plan and Scrum Report in Project

+

Cybrosys Technologies

+
+

Features:

+
    +
  •    Create your own scrum.
  • +
  •    Scrum plan.
  • +
  •    Scrum report.
  • +
  •    Notifications of scrum report.
  • +
  •    Sending mail with scrum report to admin.
  • +
  •    Pdf report for Scrum report.
  • +
+
+
+
+ +
+
+

My Scrum

+
+
+
+ +
+
+
+

+ You can create your own scrum through Project -> Scrum -> My scrum.
Here you can add your scrum plan + by specifying task name, + planned hours, current status and remarks. Then click on 'Save' button. +

+
+
+
+
+
+ +
+
+
+

+ You can also create scrum report thorough 'Scrum Report' button. Then you can edit worked hours, + current state and remarks. +

+
+
+
+
+
+ +
+
+
+

+ You have an option to send this scrum report to admin via 'Send Report' button. +

+
+
+
+
+ +
+
+

Scrum Plan

+
+
+
+ +
+
+
+

+

Project ---> Scrum ---> Scrum Plan

+

This is only for project managers. They can see all scrum plans associated with him.

+

+
+
+
+
+ +
+
+

Scrum Report

+
+
+
+ +
+
+
+

+

Project ---> Scrum ---> Scrum Plan

+

This is only for project managers. They can see all scrum reports associated with him.

+

+
+
+
+
+ +
+
+

Notifications of Scrum Report

+
+
+
+ +
+
+
+
+

+ Admin and Corresponding Project Managers will get Notifications +

+
+
+
+ +
+
+

E-mail

+
+
+
+ +
+
+
+

+ Admin will get all scrum reports via email. +

+
+ +
+
+
+ +
+
+

Pdf Report

+
+
+
+ +
+
+
+

+ Here you can take the pdf report of your scrum. +

+
+ +
+
+
+ +
+

Need Any Help?

+ +
diff --git a/project_scrum_report/static/description/my_scrum.png b/project_scrum_report/static/description/my_scrum.png new file mode 100644 index 000000000..17bf4df73 Binary files /dev/null and b/project_scrum_report/static/description/my_scrum.png differ diff --git a/project_scrum_report/static/description/report.png b/project_scrum_report/static/description/report.png new file mode 100644 index 000000000..e128e8cea Binary files /dev/null and b/project_scrum_report/static/description/report.png differ diff --git a/project_scrum_report/static/description/scrum2.png b/project_scrum_report/static/description/scrum2.png new file mode 100644 index 000000000..ce14feea5 Binary files /dev/null and b/project_scrum_report/static/description/scrum2.png differ diff --git a/project_scrum_report/static/description/scrum_3.png b/project_scrum_report/static/description/scrum_3.png new file mode 100644 index 000000000..fc9d3d080 Binary files /dev/null and b/project_scrum_report/static/description/scrum_3.png differ diff --git a/project_scrum_report/static/description/scrum_discuss.png b/project_scrum_report/static/description/scrum_discuss.png new file mode 100644 index 000000000..9bc84ddc0 Binary files /dev/null and b/project_scrum_report/static/description/scrum_discuss.png differ diff --git a/project_scrum_report/static/description/scrum_plan.png b/project_scrum_report/static/description/scrum_plan.png new file mode 100644 index 000000000..acfcd6d38 Binary files /dev/null and b/project_scrum_report/static/description/scrum_plan.png differ diff --git a/project_scrum_report/static/description/scrum_report.png b/project_scrum_report/static/description/scrum_report.png new file mode 100644 index 000000000..02de16c9d Binary files /dev/null and b/project_scrum_report/static/description/scrum_report.png differ diff --git a/project_scrum_report/views/project_scrum_view.xml b/project_scrum_report/views/project_scrum_view.xml new file mode 100644 index 000000000..f21a562b3 --- /dev/null +++ b/project_scrum_report/views/project_scrum_view.xml @@ -0,0 +1,191 @@ + + + + + project.scrum.form + project.scrum + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + project.scrum.form1 + project.scrum + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + project.scrum.tree + project.scrum + + + + + + + + + + + project.scrum.tree1 + project.scrum + + + + + + + + + + + project.scrum.search + project.scrum + + + + + + + + + + + + + + + + Scrum Plan and Report + ir.actions.act_window + project.scrum + form + tree,form + + [('user_id','=', uid)] + +

+ Click to add new Scrum. +

+
+
+ + + Scrum Plan and Report + ir.actions.act_window + project.scrum + form + tree,form + + + + + + +
+
\ No newline at end of file diff --git a/project_scrum_report/views/scrum_plan_view.xml b/project_scrum_report/views/scrum_plan_view.xml new file mode 100644 index 000000000..6cadfc09f --- /dev/null +++ b/project_scrum_report/views/scrum_plan_view.xml @@ -0,0 +1,61 @@ + + + + + scrum.plan.form + scrum.plan + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + scrum.plan.tree + scrum.plan + + + + + + + + + + + + + + + Scrum Plans + ir.actions.act_window + scrum.plan + form + tree,form + [('project_manager','=', uid)] + + + + +
+
\ No newline at end of file diff --git a/project_scrum_report/views/scrum_report_view.xml b/project_scrum_report/views/scrum_report_view.xml new file mode 100644 index 000000000..c1baa2e21 --- /dev/null +++ b/project_scrum_report/views/scrum_report_view.xml @@ -0,0 +1,61 @@ + + + + + scrum.report.form + scrum.report + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + scrum.report.tree + scrum.report + + + + + + + + + + + + + + + Scrum Reports + ir.actions.act_window + scrum.report + form + tree,form + [('project_manager','=', uid)] + + + + +
+
\ No newline at end of file diff --git a/salon_management/views/salon_data.xml b/salon_management/views/salon_data.xml index 7106a08cd..647ab240b 100644 --- a/salon_management/views/salon_data.xml +++ b/salon_management/views/salon_data.xml @@ -1,16 +1,6 @@ - - user_salon_boolean.view - res.users - - - - - - - salon_stages_form.form salon.stages