| Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB | 
| @ -0,0 +1,24 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Jesni Banu(<http://www.cybrosys.com>) | ||||
|  | #    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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | import models | ||||
|  | 
 | ||||
| @ -0,0 +1,43 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Jesni Banu(<http://www.cybrosys.com>) | ||||
|  | #    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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | { | ||||
|  |     'name': 'Workload In Project', | ||||
|  |     'version': '9.0.1.0.0', | ||||
|  |     'summary': """Calculate The Workload For Employees In Project""", | ||||
|  |     'description': 'This module helps you to calculate workload for employees', | ||||
|  |     'category': 'Project Management', | ||||
|  |     'author': 'Cybrosys Techno Solutions', | ||||
|  |     'company': 'Cybrosys Techno Solutions', | ||||
|  |     'website': "http://www.cybrosys.com", | ||||
|  |     'depends': ['base', 'project'], | ||||
|  |     'data': [ | ||||
|  |         'views/employee_workload_report_view.xml', | ||||
|  |         'reports/employee_workload_report.xml', | ||||
|  |     ], | ||||
|  |     'images': ['static/description/banner.jpg'], | ||||
|  |     'license': 'LGPL-3', | ||||
|  |     'demo': [], | ||||
|  |     'installable': True, | ||||
|  |     'auto_install': False, | ||||
|  |     'application': False, | ||||
|  | } | ||||
| @ -0,0 +1,25 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Jesni Banu(<http://www.cybrosys.com>) | ||||
|  | #    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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | import employee_workload_calc | ||||
|  | import employee_workload_parser | ||||
|  | 
 | ||||
| @ -0,0 +1,131 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Jesni Banu(<http://www.cybrosys.com>) | ||||
|  | #    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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | from datetime import datetime, timedelta | ||||
|  | from dateutil.relativedelta import relativedelta | ||||
|  | from openerp import models, fields, api, _ | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class ResUsersInherit(models.Model): | ||||
|  |     _inherit = 'res.users' | ||||
|  | 
 | ||||
|  |     progress_rate = fields.Integer(string='Workload') | ||||
|  |     maximum_rate = fields.Integer(default=100) | ||||
|  | 
 | ||||
|  |     def fields_view_get(self, cr, uid, view_id=None, view_type='kanban', context=None, toolbar=False, submenu=False): | ||||
|  |         ret_val = super(ResUsersInherit, self).fields_view_get( | ||||
|  |             cr, uid, view_id=view_id, view_type=view_type, context=context, | ||||
|  |             toolbar=toolbar, submenu=submenu) | ||||
|  |         obj = self.pool.get('res.users').search(cr, uid, []) | ||||
|  |         for each in obj: | ||||
|  |             workload_hrs = 0.0 | ||||
|  |             workload_perc = 0.0 | ||||
|  |             ir_values = self.pool.get('ir.values') | ||||
|  |             no_of_days = ir_values.get_default(cr, uid, 'project.config.settings', 'no_of_days') | ||||
|  |             no_of_hrs = ir_values.get_default(cr, uid, 'project.config.settings', 'working_hr') | ||||
|  |             user_obj = self.pool.get('res.users').browse(cr, uid, each) | ||||
|  |             if no_of_days: | ||||
|  |                 to_date = datetime.today() + timedelta(days=no_of_days) | ||||
|  |             else: | ||||
|  |                 to_date = datetime.today() + timedelta(days=6) | ||||
|  |             obj1 = self.pool.get('project.task').search(cr, uid, | ||||
|  |                                                         [('user_id', '=', user_obj.id), | ||||
|  |                                                          ('date_deadline', '>=', fields.Date.today()), | ||||
|  |                                                          ('date_deadline', '<=', to_date)]) | ||||
|  |             for each1 in obj1: | ||||
|  |                 task_obj = self.pool.get('project.task').browse(cr, uid, each1) | ||||
|  |                 time_now = fields.Date.from_string(fields.Date.today()) | ||||
|  |                 deadline = fields.Date.from_string(task_obj.date_deadline) | ||||
|  |                 workload = relativedelta(deadline, time_now) | ||||
|  |                 workload_hrs = workload_hrs + workload.days | ||||
|  |             start_date = fields.Date.from_string(fields.Date.today()) | ||||
|  |             end_date1 = to_date.strftime('%Y-%m-%d') | ||||
|  |             end_date = fields.Date.from_string(end_date1) | ||||
|  |             no_of_days1 = relativedelta(end_date, start_date) | ||||
|  |             if no_of_hrs: | ||||
|  |                 maximum_workload = no_of_hrs * no_of_days1.days | ||||
|  |             else: | ||||
|  |                 maximum_workload = 8 * no_of_days1.days | ||||
|  |             workload_perc = (workload_hrs / maximum_workload) * 100 | ||||
|  |             user_obj.write({'maximum_rate': 100, | ||||
|  |                             'progress_rate': workload_perc}) | ||||
|  |         return ret_val | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class ProjectSettings(models.Model): | ||||
|  |     _inherit = 'project.config.settings' | ||||
|  | 
 | ||||
|  |     working_hr = fields.Integer(string='Working Hr/day', default=8) | ||||
|  |     no_of_days = fields.Integer(string='No of days for calculation', default=6) | ||||
|  |     block_busy_users = fields.Boolean(string='Block busy users ?', default=False) | ||||
|  | 
 | ||||
|  |     @api.multi | ||||
|  |     def set_block_busy_users(self): | ||||
|  |         return self.env['ir.values'].sudo().set_default( | ||||
|  |             'project.config.settings', 'block_busy_users', self.block_busy_users) | ||||
|  | 
 | ||||
|  |     @api.multi | ||||
|  |     def set_working_hr(self): | ||||
|  |         return self.env['ir.values'].sudo().set_default( | ||||
|  |             'project.config.settings', 'working_hr', self.working_hr) | ||||
|  | 
 | ||||
|  |     @api.multi | ||||
|  |     def set_no_of_days(self): | ||||
|  |         return self.env['ir.values'].sudo().set_default( | ||||
|  |             'project.config.settings', 'no_of_days', self.no_of_days) | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class ProjectInherit(models.Model): | ||||
|  |     _inherit = 'project.task' | ||||
|  | 
 | ||||
|  |     @api.constrains('user_id') | ||||
|  |     def validation(self): | ||||
|  |         ir_values = self.pool.get('ir.values') | ||||
|  |         block_users = ir_values.get_default(self._cr, self._uid, 'project.config.settings', 'block_busy_users') | ||||
|  |         if block_users: | ||||
|  |             if self.user_id.progress_rate > 80: | ||||
|  |                 raise Warning(_('%s is %s percentage Overloaded with Work') % (self.user_id.name, self.user_id.progress_rate)) | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class EmployeeWorkloadReport(models.TransientModel): | ||||
|  |     _name = "wizard.workload.report" | ||||
|  |     _description = "Employee Workload Report" | ||||
|  | 
 | ||||
|  |     working_hr = fields.Integer(string='Working Hr/day', required=True, default=8) | ||||
|  |     from_date = fields.Date(string='From Date', required=True) | ||||
|  |     to_date = fields.Date(string='To Date', required=True) | ||||
|  | 
 | ||||
|  |     _defaults = { | ||||
|  |         'from_date': lambda *a: datetime.now().strftime('%Y-%m-%d'), | ||||
|  |         'to_date': datetime.today() + timedelta(days=6) | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @api.multi | ||||
|  |     def workload_report(self): | ||||
|  |         data = self.read()[0] | ||||
|  |         datas = { | ||||
|  |             'ids': [], | ||||
|  |             'model': 'wizard.workload.report', | ||||
|  |             'form': data | ||||
|  |         } | ||||
|  |         return self.env['report'].get_action(self, 'workload_in_project.report_employee_workload', data=datas) | ||||
|  | 
 | ||||
| @ -0,0 +1,91 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Jesni Banu(<http://www.cybrosys.com>) | ||||
|  | #    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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | from dateutil.relativedelta import relativedelta | ||||
|  | from openerp.report import report_sxw | ||||
|  | from openerp.osv import osv | ||||
|  | from openerp import fields | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class EmployeeWorkloadReportCommon(report_sxw.rml_parse): | ||||
|  | 
 | ||||
|  |     def __init__(self, cr, uid, name, context=None): | ||||
|  |         super(EmployeeWorkloadReportCommon, self).__init__(cr, uid, name, context=context) | ||||
|  |         self.localcontext.update({ | ||||
|  |             'get_mxm_workload': self.get_mxm_workload, | ||||
|  |             'get_line': self.get_lines, | ||||
|  |         }) | ||||
|  |         self.context = context | ||||
|  | 
 | ||||
|  |     def get_mxm_workload(self, data): | ||||
|  |         start_date = fields.Date.from_string(data['form']['from_date']) | ||||
|  |         end_date = fields.Date.from_string(data['form']['to_date']) | ||||
|  |         no_of_days = relativedelta(end_date, start_date) | ||||
|  |         maximum_workload = data['form']['working_hr'] * no_of_days.days | ||||
|  |         return maximum_workload | ||||
|  | 
 | ||||
|  |     def get_lines(self, data): | ||||
|  |         obj = self.pool.get('res.users').search(self.cr, self.uid, []) | ||||
|  |         lines = [] | ||||
|  |         for each in obj: | ||||
|  |             workload_hrs = 0.0 | ||||
|  |             workload_perc = 0.0 | ||||
|  |             user_obj = self.pool.get('res.users').browse(self.cr, self.uid, each) | ||||
|  |             obj1 = self.pool.get('project.task').search(self.cr, self.uid, | ||||
|  |                                                         [('user_id', '=', user_obj.id), | ||||
|  |                                                          ('date_deadline', '>=', data['form']['from_date']), | ||||
|  |                                                          ('date_deadline', '<=', data['form']['to_date'])]) | ||||
|  |             for each1 in obj1: | ||||
|  |                 task_obj = self.pool.get('project.task').browse(self.cr, self.uid, each1) | ||||
|  |                 time_now = fields.Date.from_string(fields.Date.today()) | ||||
|  |                 deadline = fields.Date.from_string(task_obj.date_deadline) | ||||
|  |                 workload = relativedelta(deadline, time_now) | ||||
|  |                 workload_hrs = workload_hrs + workload.days | ||||
|  |             maximum_workload = self.get_mxm_workload(data) | ||||
|  |             workload_perc = (workload_hrs / maximum_workload) * 100 | ||||
|  |             if workload_perc > 100: | ||||
|  |                 status = 'Over Workload' | ||||
|  |             elif workload_perc > 75: | ||||
|  |                 status = 'Busy' | ||||
|  |             elif workload_perc > 50: | ||||
|  |                 status = 'Normal' | ||||
|  |             elif workload_perc > 0: | ||||
|  |                 status = 'Less Workload' | ||||
|  |             else: | ||||
|  |                 status = 'Free' | ||||
|  |             vals = { | ||||
|  |                 'employee': user_obj.name, | ||||
|  |                 'no_of_works': len(obj1), | ||||
|  |                 'workload': workload_hrs, | ||||
|  |                 'workload_perc': workload_perc, | ||||
|  |                 'status': status, | ||||
|  |             } | ||||
|  |             lines.append(vals) | ||||
|  |         return lines | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class PrintReport(osv.AbstractModel): | ||||
|  |     _name = 'report.workload_in_project.report_employee_workload' | ||||
|  |     _inherit = 'report.abstract_report' | ||||
|  |     _template = 'workload_in_project.report_employee_workload' | ||||
|  |     _wrapped_report_class = EmployeeWorkloadReportCommon | ||||
|  | 
 | ||||
| @ -0,0 +1,66 @@ | |||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||
|  | <openerp> | ||||
|  |     <data> | ||||
|  |         <template id="report_employee_workload"> | ||||
|  |             <t t-call="report.html_container"> | ||||
|  |                 <t t-call="report.internal_layout"> | ||||
|  |                     <div class="page"> | ||||
|  |                         <div class="header" style="text-align:center;"><h1><strong>Employee Workload Report</strong></h1></div> | ||||
|  |                         <div class="row mt32 mb32" style="text-align:center;"> | ||||
|  |                             <t t-if="data"> | ||||
|  |                                 <div class="col-xs-3"> | ||||
|  |                                     <strong>Working Hour/Day</strong> | ||||
|  |                                     <p t-esc="data['form']['working_hr']"/> | ||||
|  |                                 </div> | ||||
|  |                                 <div class="col-xs-3"> | ||||
|  |                                     <strong>From Date:</strong> | ||||
|  |                                     <p t-esc="data['form']['from_date']"/> | ||||
|  |                                 </div> | ||||
|  |                                 <div class="col-xs-3"> | ||||
|  |                                     <strong>To Date:</strong> | ||||
|  |                                     <p t-esc="data['form']['to_date']"/> | ||||
|  |                                 </div> | ||||
|  |                                 <div class="col-xs-3"> | ||||
|  |                                     <strong>Maximum Workload(hours):</strong> | ||||
|  |                                     <p t-esc="get_mxm_workload(data)"/> | ||||
|  |                                 </div> | ||||
|  |                             </t> | ||||
|  |                         </div> | ||||
|  |                         <table class="table table-condensed"> | ||||
|  |                             <thead> | ||||
|  |                                 <tr> | ||||
|  |                                     <th>Employee</th> | ||||
|  |                                     <th>No of Works</th> | ||||
|  |                                     <th>Workload</th> | ||||
|  |                                     <th>Workload in %</th> | ||||
|  |                                     <th>Status</th> | ||||
|  |                                 </tr> | ||||
|  |                             </thead> | ||||
|  |                             <tbody> | ||||
|  |                                 <t t-foreach="get_line(data)" t-as="workload"> | ||||
|  |                                     <tr> | ||||
|  |                                         <td> | ||||
|  |                                             <span t-att-style="style" t-esc="workload['employee']"/> | ||||
|  |                                         </td> | ||||
|  |                                         <td> | ||||
|  |                                             <span t-att-style="style" t-esc="workload['no_of_works']"/> | ||||
|  |                                         </td> | ||||
|  |                                         <td> | ||||
|  |                                             <span t-att-style="style" t-esc="workload['workload']"/> | ||||
|  |                                         </td> | ||||
|  |                                         <td> | ||||
|  |                                             <span t-att-style="style" t-esc="workload['workload_perc']"/> | ||||
|  |                                         </td> | ||||
|  |                                         <td> | ||||
|  |                                             <span t-att-style="style" t-esc="workload['status']"/> | ||||
|  |                                         </td> | ||||
|  |                                     </tr> | ||||
|  |                                 </t> | ||||
|  |                             </tbody> | ||||
|  |                         </table> | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |             </t> | ||||
|  |         </template> | ||||
|  |     </data> | ||||
|  | </openerp> | ||||
| After Width: | Height: | Size: 124 KiB | 
| After Width: | Height: | Size: 50 KiB | 
| After Width: | Height: | Size: 22 KiB | 
| @ -0,0 +1,123 @@ | |||||
|  |     <section class="oe_container"> | ||||
|  |         <div class="oe_row oe_spaced"> | ||||
|  |             <h2 class="oe_slogan">Workload In Project</h2> | ||||
|  |             <h3 class="oe_slogan">Calculate The Workload For Employees In Project</h3> | ||||
|  |             <h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> | ||||
|  |             <div> | ||||
|  |                 <h4><p>Features:</p></h4> | ||||
|  |                 <ul> | ||||
|  |                     <li style="list-style:none !important;"><span style="color:green;"> ☑</span>   Employee workload report.</li> | ||||
|  |                     <li style="list-style:none !important;"><span style="color:green;"> ☑</span>   Workload progressbar in kanban view.</li> | ||||
|  |                     <li style="list-style:none !important;"><span style="color:green;"> ☑</span>   Raise validation error while assigning task to busy users.</li> | ||||
|  |                     <li style="list-style:none !important;"><span style="color:green;"> ☑</span>   Workload Configuration.</li> | ||||
|  |                 </ul> | ||||
|  |             </div> | ||||
|  |          </div> | ||||
|  |     </section> | ||||
|  | 
 | ||||
|  |     <section class="oe_container oe_dark"> | ||||
|  |          <div class="oe_row oe_spaced"> | ||||
|  |             <h3 class="oe_slogan">Workload Configuration</h3> | ||||
|  |             <div class="oe_row oe_spaced"> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <div class="oe_row_img oe_centered"> | ||||
|  |                         <img style="border:10px solid white;" class="oe_picture oe_screenshot" src="project_config.png"> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <p class="oe_mt32"> | ||||
|  |                         Users can configure the employee workload settings. Here user can give working hr/day and no of days to calculate workload. | ||||
|  |                         And also user have an option to block busy users from assigning task via ticking 'Block Busy Users' field. | ||||
|  |                     </p> | ||||
|  |                 </div> | ||||
|  | 
 | ||||
|  |             </div> | ||||
|  |          </div> | ||||
|  |     </section> | ||||
|  | 
 | ||||
|  |     <section class="oe_container"> | ||||
|  |         <div class="oe_row oe_spaced"> | ||||
|  |             <h3 class="oe_slogan">Employee workload report</h3> | ||||
|  |             <div class="oe_row oe_spaced"> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <div class="oe_row_img oe_centered"> | ||||
|  |                         <img style="border:10px solid white;" class="oe_picture oe_screenshot" src="wizard.png"> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <p class="oe_mt32"> | ||||
|  |                             <p>Project ---> Report ---> Employee Workload</p> | ||||
|  |                         <p>This wizard allows you to take Employee Workload Report. Here You can give from date, to date and working hr/day. Then you will get corresponding Report.  </p> | ||||
|  |                     </p> | ||||
|  |                 </div> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <div class="oe_row_img oe_centered"> | ||||
|  |                         <img style="border:10px solid white;" class="oe_picture oe_screenshot" src="report.png"> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </section> | ||||
|  | 
 | ||||
|  |     <section class="oe_container oe_dark"> | ||||
|  |         <div class="oe_row oe_spaced"> | ||||
|  |             <h3 class="oe_slogan">Workload progressbar in kanban view</h3> | ||||
|  |             <div class="oe_row oe_spaced"> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <div class="oe_row_img oe_centered"> | ||||
|  |                         <img style="border:10px solid white;" class="oe_picture oe_screenshot" src="users.png"> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |             <div class="oe_row oe_spaced"> | ||||
|  |                 <p> | ||||
|  |                     Here you can see workload progress bar for each users. | ||||
|  |                 </p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </section> | ||||
|  | 
 | ||||
|  |     <section class="oe_container "> | ||||
|  |         <div class="oe_row oe_spaced"> | ||||
|  |             <h3 class="oe_slogan">Validation for Busy Users</h3> | ||||
|  |             <div class="oe_row oe_spaced"> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <div class="oe_row_img oe_centered"> | ||||
|  |                         <img style="border:10px solid white;" class="oe_picture oe_screenshot" src="validation1.png"> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |                 <div class="oe_span12"> | ||||
|  |                     <p class="oe_mt32"> | ||||
|  |                        If you tick on 'Block busy users' from configuration then the module will raise a warning when you try to assign work for busy users. | ||||
|  |                     </p> | ||||
|  |                 </div> | ||||
|  | 
 | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </section> | ||||
|  | 
 | ||||
|  |     <section class="oe_container oe_dark"> | ||||
|  |             <h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> | ||||
|  |             <div class="oe_slogan" style="margin-top:10px !important;"> | ||||
|  |                 <div> | ||||
|  |                     <a  class="btn btn-primary btn-lg mt8" | ||||
|  |                     style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i | ||||
|  |                     class="fa fa-envelope"></i> Email </a> <a | ||||
|  |                     class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" | ||||
|  |                     href="http://www.cybrosys.com/contact/"><i | ||||
|  |                     class="fa fa-phone"></i> Contact Us </a> <a | ||||
|  |                     class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" | ||||
|  |                     href="http://www.cybrosys.com/odoo-customization-and-installation/"><i | ||||
|  |                     class="fa fa-check-square"></i> Request Customization </a> | ||||
|  |                 </div> | ||||
|  |                 <br> | ||||
|  |                 <img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> | ||||
|  |                 <div> | ||||
|  |                   <a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> | ||||
|  |                   <a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> | ||||
|  |                   <a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> | ||||
|  |                   <a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> | ||||
|  |                   <a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |     </section> | ||||
| After Width: | Height: | Size: 103 KiB | 
| After Width: | Height: | Size: 30 KiB | 
| After Width: | Height: | Size: 76 KiB | 
| After Width: | Height: | Size: 12 KiB | 
| After Width: | Height: | Size: 13 KiB | 
| @ -0,0 +1,114 @@ | |||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||
|  | <openerp> | ||||
|  |     <data> | ||||
|  |         <record model='ir.ui.view' id='wizard_workload_report_form_view'> | ||||
|  |             <field name="name">wizard.workload.report.form</field> | ||||
|  |             <field name="model">wizard.workload.report</field> | ||||
|  |             <field name="arch" type="xml"> | ||||
|  |                 <form string="Employee Workload Report"> | ||||
|  |                     <group> | ||||
|  |                         <group> | ||||
|  |                             <field name="from_date"/> | ||||
|  |                             <field name="to_date"/> | ||||
|  |                         </group> | ||||
|  |                         <group> | ||||
|  |                             <field name="working_hr"/> | ||||
|  |                         </group> | ||||
|  |                     </group> | ||||
|  |                     <footer> | ||||
|  |                         <button name="workload_report" type="object" default_focus="1" | ||||
|  |                                 string="Print" class="oe_highlight" | ||||
|  |                                 icon="gtk-print"/> | ||||
|  |                         or | ||||
|  |                         <button string="Cancel" class="oe_link" special="cancel" /> | ||||
|  |                     </footer> | ||||
|  |                 </form> | ||||
|  |             </field> | ||||
|  |         </record> | ||||
|  | 
 | ||||
|  |         <record model='ir.actions.act_window' id='wizard_workload_report_act'> | ||||
|  |             <field name="name">Employee Workload Report</field> | ||||
|  |             <field name="res_model">wizard.workload.report</field> | ||||
|  |             <field name="view_type">form</field> | ||||
|  |             <field name="view_mode">form</field> | ||||
|  |             <field name="view_id" ref="wizard_workload_report_form_view"/> | ||||
|  |             <field name="target">new</field> | ||||
|  |         </record> | ||||
|  | 
 | ||||
|  |         <record model="ir.ui.view" id="res_user_kanban_view"> | ||||
|  |             <field name="name">res.users.kanban</field> | ||||
|  |             <field name="model">res.users</field> | ||||
|  |             <field name="arch" type="xml"> | ||||
|  |                 <kanban class="o_res_partner_kanban"> | ||||
|  |                     <field name="color"/> | ||||
|  |                     <field name="display_name"/> | ||||
|  |                     <field name="email"/> | ||||
|  |                     <field name="image"/> | ||||
|  |                     <field name="progress_rate"/> | ||||
|  |                     <field name="maximum_rate"/> | ||||
|  |                     <field name="image"/> | ||||
|  |                     <templates> | ||||
|  |                         <t t-name="kanban-box"> | ||||
|  |                             <div class="oe_kanban_content"> | ||||
|  |                                 <div> | ||||
|  |                                     <div style="display: inline-block"> | ||||
|  |                                          <div class="o_kanban_image"> | ||||
|  |                                             <t t-if="record.image.raw_value"> | ||||
|  |                                                 <img t-att-src="kanban_image('res.users', 'image_small', record.id.value)"/> | ||||
|  |                                             </t> | ||||
|  |                                          </div> | ||||
|  |                                         <div class="oe_kanban_details"> | ||||
|  |                                             <strong class="oe_partner_heading"><field name="display_name"/></strong> | ||||
|  |                                             <ul> | ||||
|  |                                                 <li t-if="record.email.raw_value" class="o_text_overflow"><field name="email"/></li> | ||||
|  |                                             </ul> | ||||
|  |                                             <div class="oe_kanban_partner_links"/> | ||||
|  |                                         </div> | ||||
|  |                                         <field name="progress_rate" widget="gauge" style="width:120px; height: 90px;" | ||||
|  |                                                 options="{'max_field': 'maximum_rate'}"/> | ||||
|  |                                     </div> | ||||
|  |                                 </div> | ||||
|  |                             </div> | ||||
|  |                         </t> | ||||
|  |                     </templates> | ||||
|  |                 </kanban> | ||||
|  |             </field> | ||||
|  |         </record> | ||||
|  | 
 | ||||
|  |         <record id="project_inherit_config_settings" model="ir.ui.view"> | ||||
|  |             <field name="name">project settings</field> | ||||
|  |             <field name="model">project.config.settings</field> | ||||
|  |             <field name="inherit_id" ref="project.view_config_settings"/> | ||||
|  |             <field name="arch" type="xml"> | ||||
|  |                 <xpath expr="//group[3]" position="after"> | ||||
|  |                     <group string="Employee Workload"> | ||||
|  |                         <field name="working_hr"/> | ||||
|  |                         <field name="no_of_days"/> | ||||
|  |                         <field name="block_busy_users"/> | ||||
|  |                     </group> | ||||
|  |                 </xpath> | ||||
|  |             </field> | ||||
|  |         </record> | ||||
|  | 
 | ||||
|  |          <record id="project_action_res_users" model="ir.actions.act_window"> | ||||
|  |             <field name="name">Project Users</field> | ||||
|  |             <field name="type">ir.actions.act_window</field> | ||||
|  |             <field name="res_model">res.users</field> | ||||
|  |             <field name="view_type">form</field> | ||||
|  |             <field name="view_mode">kanban</field> | ||||
|  |             <field name="view_id" ref="res_user_kanban_view"/> | ||||
|  |         </record> | ||||
|  | 
 | ||||
|  |         <report id="action_employee_workload" | ||||
|  |                 model="hr.employee" | ||||
|  |                 report_type="qweb-pdf" | ||||
|  |                 string="Employee Workload Report" | ||||
|  |                 name="workload_in_project.report_employee_workload" | ||||
|  |                 file="workload_in_project.report_employee_workload"/> | ||||
|  | 
 | ||||
|  |         <menuitem name="Report" parent="base.menu_main_pm" id="workload_report" sequence="5"/> | ||||
|  |         <menuitem name="Users" parent="base.menu_main_pm" id="project_users" action="project_action_res_users" sequence="4"/> | ||||
|  |         <menuitem name="Employee Workload" parent="workload_report" id="employee_workload_report" action="wizard_workload_report_act" sequence="1"/> | ||||
|  | 
 | ||||
|  |     </data> | ||||
|  | </openerp> | ||||