diff --git a/hr_employee_shift/README.rst b/hr_employee_shift/README.rst deleted file mode 100644 index becfda80b..000000000 --- a/hr_employee_shift/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -OHRMS Employee Shift v11 -======================== - -Easily create, manage, and track employee shift schedules - -Depends -======= -[hr] addon Odoo - -Tech -==== -* [Python] - Models -* [XML] - Odoo views - -Installation -============ -- www.odoo.com/documentation/10.0/setup/install.html -- Install our custom addon - -License -======= -GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (LGPLv3) -(http://www.gnu.org/licenses/agpl.html) - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- - -Developer: Saritha Sahadevan, saritha@cybrosys.in - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_employee_shift/__init__.py b/hr_employee_shift/__init__.py deleted file mode 100644 index 7cacd9c23..000000000 --- a/hr_employee_shift/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import models diff --git a/hr_employee_shift/__manifest__.py b/hr_employee_shift/__manifest__.py deleted file mode 100644 index 29dab1050..000000000 --- a/hr_employee_shift/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open Hrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': "Open HRMS Employee Shift", - 'version': '11.0.1.0.0', - 'summary': """Easily create, manage, and track employee shift schedules.""", - 'description': """Easily create, manage, and track employee shift schedules.""", - 'category': 'Human Resource', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['hr', 'hr_payroll', 'resource'], - 'data': [ - 'security/ir.model.access.csv', - 'security/hr_employee_shift_security.xml', - 'views/hr_employee_shift_view.xml', - 'views/hr_employee_contract_view.xml', - 'views/hr_generate_shift_view.xml', - 'views/templates.xml', - ], - 'demo': [ - 'demo/shift_schedule_data.xml', - ], - 'images': ["static/description/banner.jpg"], - 'license': "AGPL-3", - 'installable': True, - 'application': True, -} diff --git a/hr_employee_shift/demo/shift_schedule_data.xml b/hr_employee_shift/demo/shift_schedule_data.xml deleted file mode 100644 index 863a85449..000000000 --- a/hr_employee_shift/demo/shift_schedule_data.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - Morning - - - - - - diff --git a/hr_employee_shift/doc/RELEASE_NOTES.md b/hr_employee_shift/doc/RELEASE_NOTES.md deleted file mode 100644 index 95cfa4db2..000000000 --- a/hr_employee_shift/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 21.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_employee_shift/models/__init__.py b/hr_employee_shift/models/__init__.py deleted file mode 100644 index e00ab4743..000000000 --- a/hr_employee_shift/models/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import hr_employee_shift, hr_employee_contract, hr_generate_shift, hr_shift_payroll diff --git a/hr_employee_shift/models/hr_employee_contract.py b/hr_employee_shift/models/hr_employee_contract.py deleted file mode 100644 index 4d833d3e6..000000000 --- a/hr_employee_shift/models/hr_employee_contract.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo.exceptions import Warning -from odoo import models, fields, api, _ - - -class HrEmployeeContract(models.Model): - _inherit = 'hr.contract' - - shift_schedule = fields.One2many('hr.shift.schedule', 'rel_hr_schedule', string="Shift Schedule") - working_hours = fields.Many2one('resource.calendar', string='Working Schedule') - department_id = fields.Many2one('hr.department', string="Department", - required=True) - - -class HrSchedule(models.Model): - _name = 'hr.shift.schedule' - - start_date = fields.Date(string="Date From", required=True) - end_date = fields.Date(string="Date To", required=True) - rel_hr_schedule = fields.Many2one('hr.contract') - hr_shift = fields.Many2one('resource.calendar', string="Shift", required=True) - - @api.onchange('start_date', 'end_date') - def get_department(self): - """Adding domain to the hr_shift field""" - hr_department = None - if self.start_date: - hr_department = self.rel_hr_schedule.department_id.id - return { - 'domain': { - 'hr_shift': [('hr_department', '=', hr_department)] - } - } - - @api.multi - def write(self, vals): - self._check_overlap(vals) - return super(HrSchedule, self).write(vals) - - @api.model - def create(self, vals): - self._check_overlap(vals) - return super(HrSchedule, self).create(vals) - - def _check_overlap(self, vals): - if vals.get('start_date', False) and vals.get('end_date', False): - shifts = self.env['hr.shift.schedule'].search([('rel_hr_schedule', '=', vals.get('rel_hr_schedule'))]) - for each in shifts: - if each != shifts[-1]: - if each.end_date >= vals.get('start_date') or each.start_date >= vals.get('start_date'): - raise Warning(_('The dates may not overlap with one another.')) - if vals.get('start_date') > vals.get('end_date'): - raise Warning(_('Start date should be less than end date.')) - return True - diff --git a/hr_employee_shift/models/hr_employee_shift.py b/hr_employee_shift/models/hr_employee_shift.py deleted file mode 100644 index 9a8473d8c..000000000 --- a/hr_employee_shift/models/hr_employee_shift.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo.exceptions import ValidationError -from odoo import models, fields, api, _ - - -class HrEmployeeInherited(models.Model): - _inherit = 'hr.employee' - - resource_calendar_ids = fields.Many2one('resource.calendar', 'Working Hours') - - -class HrEmployeeShift(models.Model): - _inherit = 'resource.calendar' - - def _get_default_attendance_ids(self): - return [ - (0, 0, {'name': _('Monday Morning'), 'dayofweek': '0', 'hour_from': 8, 'hour_to': 12}), - (0, 0, {'name': _('Tuesday Morning'), 'dayofweek': '1', 'hour_from': 8, 'hour_to': 12}), - (0, 0, {'name': _('Wednesday Morning'), 'dayofweek': '2', 'hour_from': 8, 'hour_to': 12}), - (0, 0, {'name': _('Thursday Morning'), 'dayofweek': '3', 'hour_from': 8, 'hour_to': 12}), - (0, 0, {'name': _('Friday Morning'), 'dayofweek': '4', 'hour_from': 8, 'hour_to': 12}), - ] - - color = fields.Integer(string='Color Index') - hr_department = fields.Many2one('hr.department', string="Department", required=True) - sequence = fields.Integer(string="Sequence", required=True, default=1) - attendance_ids = fields.One2many( - 'resource.calendar.attendance', 'calendar_id', 'Workingssss Time', - copy=True, default=_get_default_attendance_ids) - - @api.constrains('sequence') - def validate_seq(self): - record = self.env['resource.calendar'].search([('hr_department', '=', self.hr_department.id), - ('sequence', '=', self.sequence) - ]) - if len(record) > 1: - raise ValidationError("One record with same sequence is already active." - "You can't activate more than one record at a time") - - diff --git a/hr_employee_shift/models/hr_generate_shift.py b/hr_employee_shift/models/hr_generate_shift.py deleted file mode 100644 index db60362c6..000000000 --- a/hr_employee_shift/models/hr_generate_shift.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo import models, fields - - -class HrGenerateShift(models.Model): - _name = 'hr.shift.generate' - - hr_department = fields.Many2one('hr.department', string="Department") - start_date = fields.Date(string="Start Date", required=True) - end_date = fields.Date(string="End Date", required=True) - - def action_schedule_shift(self): - """Create mass schedule for all departments based on the shift scheduled in corresponding employee's contract""" - - if self.hr_department: - for contract in self.env['hr.contract'].search([('department_id', '=', self.hr_department.id)]): - if contract.shift_schedule: - for shift_val in contract.shift_schedule: - shift = shift_val.hr_shift - start_date = self.start_date - end_date = self.end_date - shift_obj = self.env['resource.calendar'].search([('hr_department', '=', self.hr_department.id), - ('name', '=', shift.name)], limit=1) - sequence = shift_obj.sequence - seq_no = sequence + 1 - new_shift = self.env['resource.calendar'].search([ - ('sequence', '=', seq_no), ('hr_department', '=', self.hr_department.id)], limit=1) - if new_shift: - shift_ids = [(0, 0, { - 'hr_shift': new_shift.id, - 'start_date': start_date, - 'end_date': end_date - })] - contract.shift_schedule = shift_ids - else: - seq_no = 1 - new_shift = self.env['resource.calendar'].search([ - ('sequence', '=', seq_no), ('hr_department', '=', self.hr_department.id)], limit=1) - if new_shift: - shift_ids = [(0, 0, { - 'hr_shift': new_shift.id, - 'start_date': start_date, - 'end_date': end_date - })] - contract.shift_schedule = shift_ids - else: - for contract in self.env['hr.contract'].search([]): - if contract.shift_schedule and contract.department_id: - for shift_val in contract.shift_schedule: - shift = shift_val.hr_shift - start_date = self.start_date - end_date = self.end_date - shift_obj = self.env['resource.calendar'].search([('hr_department', '=', contract.department_id.id), - ('name', '=', shift.name)], limit=1) - sequence = shift_obj.sequence - seq_no = sequence + 1 - new_shift = self.env['resource.calendar'].search([ - ('sequence', '=', seq_no), ('hr_department', '=', contract.department_id.id)], limit=1) - if new_shift: - shift_ids = [(0, 0, { - 'hr_shift': new_shift.id, - 'start_date': start_date, - 'end_date': end_date - })] - contract.shift_schedule = shift_ids - else: - seq_no = 1 - new_shift = self.env['resource.calendar'].search([ - ('sequence', '=', seq_no), ('hr_department', '=', contract.department_id.id)], limit=1) - shift_ids = [(0, 0, { - 'hr_shift': new_shift.id, - 'start_date': start_date, - 'end_date': end_date - })] - contract.shift_schedule = shift_ids - - - - - diff --git a/hr_employee_shift/models/hr_shift_payroll.py b/hr_employee_shift/models/hr_shift_payroll.py deleted file mode 100644 index 2c25766df..000000000 --- a/hr_employee_shift/models/hr_shift_payroll.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from datetime import datetime, timedelta -from odoo import models, fields, api, _, tools - - -class HrPayroll(models.Model): - _inherit = 'hr.payslip' - - @api.model - def get_worked_day_lines(self, contract_ids, date_from, date_to): - """ - @param contract_ids: list of contract id - @return: returns a list of dict containing the input that should be applied for the given contract between date_from and date_to - """ - - def was_on_leave_interval(employee_id, date_from, date_to): - date_from = fields.Datetime.to_string(date_from) - date_to = fields.Datetime.to_string(date_to) - return self.env['hr.holidays'].search([ - ('state', '=', 'validate'), - ('employee_id', '=', employee_id), - ('type', '=', 'remove'), - ('date_from', '<=', date_from), - ('date_to', '>=', date_to) - ], limit=1) - - res = [] - # fill only if the contract as a working schedule linked - uom_day = self.env.ref('product.product_uom_day', raise_if_not_found=False) - for contract in self.env['hr.contract'].browse(contract_ids).filtered(lambda contract: contract): - uom_hour = contract.employee_id.resource_id.calendar_id.uom_id or self.env.ref('product.product_uom_hour', - raise_if_not_found=False) - interval_data = [] - holidays = self.env['hr.holidays'] - attendances = { - 'name': _("Normal Working Days paid at 100%"), - 'sequence': 1, - 'code': 'WORK100', - 'number_of_days': 0.0, - 'number_of_hours': 0.0, - 'contract_id': contract.id, - } - leaves = {} - - # Gather all intervals and holidays - for days in contract.shift_schedule: - start_date = datetime.strptime(days.start_date, tools.DEFAULT_SERVER_DATE_FORMAT) - end_date = datetime.strptime(days.end_date, tools.DEFAULT_SERVER_DATE_FORMAT) - - nb_of_days = (end_date - start_date).days + 1 - for day in range(0, nb_of_days): - - working_intervals_on_day = days.hr_shift.get_working_intervals_of_day( - start_dt=start_date + timedelta(days=day)) - for interval in working_intervals_on_day: - interval_data.append( - (interval, was_on_leave_interval(contract.employee_id.id, interval[0], interval[1]))) - - # Extract information from previous data. A working interval is considered: - # - as a leave if a hr.holiday completely covers the period - # - as a working period instead - for interval, holiday in interval_data: - holidays |= holiday - hours = (interval[1] - interval[0]).total_seconds() / 3600.0 - if holiday: - # if he was on leave, fill the leaves dict - if holiday.holiday_status_id.name in leaves: - leaves[holiday.holiday_status_id.name]['number_of_hours'] += hours - else: - leaves[holiday.holiday_status_id.name] = { - 'name': holiday.holiday_status_id.name, - 'sequence': 5, - 'code': holiday.holiday_status_id.name, - 'number_of_days': 0.0, - 'number_of_hours': hours, - 'contract_id': contract.id, - } - else: - # add the input vals to tmp (increment if existing) - attendances['number_of_hours'] += hours - # Clean-up the results - leaves = [value for key, value in leaves.items()] - for data in [attendances] + leaves: - data['number_of_days'] = uom_hour._compute_quantity(data['number_of_hours'], uom_day) \ - if uom_day and uom_hour \ - else data['number_of_hours'] / 8.0 - res.append(data) - return res \ No newline at end of file diff --git a/hr_employee_shift/security/hr_employee_shift_security.xml b/hr_employee_shift/security/hr_employee_shift_security.xml deleted file mode 100644 index 2b9a20882..000000000 --- a/hr_employee_shift/security/hr_employee_shift_security.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - Hr Shift Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Hr Shift Genarate Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - \ No newline at end of file diff --git a/hr_employee_shift/security/ir.model.access.csv b/hr_employee_shift/security/ir.model.access.csv deleted file mode 100644 index a51d85c3b..000000000 --- a/hr_employee_shift/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_hr_employee_shift_hr_employee_shift,hr_employee_shift.hr_shift_schedule,model_hr_shift_schedule,hr.group_hr_manager,1,1,1,1 -access_hr_employee_shift_hr_employee_shift1,hr_employee_shift.hr_shift_generate,model_hr_shift_generate,hr.group_hr_manager,1,1,1,1 \ No newline at end of file diff --git a/hr_employee_shift/static/description/HRMS-BUTTON.png b/hr_employee_shift/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_employee_shift/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_employee_shift/static/description/banner.jpg b/hr_employee_shift/static/description/banner.jpg deleted file mode 100644 index 9d6978271..000000000 Binary files a/hr_employee_shift/static/description/banner.jpg and /dev/null differ diff --git a/hr_employee_shift/static/description/contract1.png b/hr_employee_shift/static/description/contract1.png deleted file mode 100644 index 2fcae184f..000000000 Binary files a/hr_employee_shift/static/description/contract1.png and /dev/null differ diff --git a/hr_employee_shift/static/description/create_shift.png b/hr_employee_shift/static/description/create_shift.png deleted file mode 100644 index 9bdaf57ea..000000000 Binary files a/hr_employee_shift/static/description/create_shift.png and /dev/null differ diff --git a/hr_employee_shift/static/description/cybro-service.png b/hr_employee_shift/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_employee_shift/static/description/cybro-service.png and /dev/null differ diff --git a/hr_employee_shift/static/description/cybro_logo.png b/hr_employee_shift/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_employee_shift/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_employee_shift/static/description/generate_schedule.png b/hr_employee_shift/static/description/generate_schedule.png deleted file mode 100644 index 72b434978..000000000 Binary files a/hr_employee_shift/static/description/generate_schedule.png and /dev/null differ diff --git a/hr_employee_shift/static/description/icon.png b/hr_employee_shift/static/description/icon.png deleted file mode 100644 index 674251dd4..000000000 Binary files a/hr_employee_shift/static/description/icon.png and /dev/null differ diff --git a/hr_employee_shift/static/description/index.html b/hr_employee_shift/static/description/index.html deleted file mode 100644 index 643f69434..000000000 --- a/hr_employee_shift/static/description/index.html +++ /dev/null @@ -1,136 +0,0 @@ -
-
-
-

Open HRMS

-

Most advanced open source HR management software

-
-
-
- -
-
-
-
- - - -
-
-
-
- -
-
-
-

Employee Shift Management

-

Easily create, manage, and track employee shift schedules.

-

Cybrosys Technologies

-
-
-

Major Features:

-
    -
  •    Define list of Work Shifts
  • -
  •    Define flexible hour wise shift
  • -
  •    Assign shift in employee contract
  • -
  •    Assign new shift automatically
  • -
-
-
-
- -
-
-
-

Overview

-

- Employee Shift Management is a component of Open HRMS suit. - This module allows the user to create and manage employee work shifts. - Administrator can create various shifts according to the working hours and assign the Shift in - employee work contract. The module also helps to automatically assign new shift according to - the shift sequence -

-
-
-
- -
-
-
-

Create Employee Shift

-
- -
-
-
-
- -
-
-

Employee Shift In Contract

-
-
- -
-
-
-

Have an option to schedule shift in employee contract form. - It is very important to create atleast one shift schedule manually in contract form

-
-
-
- - -
-
-

Generate Automatic Shifts

-

-

Automatically assign new shift according to the shift sequence

-

-
-
- -
-
-
-

Employee Shifts

-
- -
-
-
-
- -
-
-

Our Odoo Services

-
-
-
- - -
-

Need Any Help?

- -
\ No newline at end of file diff --git a/hr_employee_shift/static/description/shift.png b/hr_employee_shift/static/description/shift.png deleted file mode 100644 index e1669ff62..000000000 Binary files a/hr_employee_shift/static/description/shift.png and /dev/null differ diff --git a/hr_employee_shift/static/src/css/shift_dashboard.css b/hr_employee_shift/static/src/css/shift_dashboard.css deleted file mode 100644 index f99fe0e91..000000000 --- a/hr_employee_shift/static/src/css/shift_dashboard.css +++ /dev/null @@ -1,7 +0,0 @@ - -.style_shift{ - color: black !important; - font-size: 15px; - text-align: center; - padding: 10px 0px 2px 3px; -} diff --git a/hr_employee_shift/static/src/less/shift_dashboard.less b/hr_employee_shift/static/src/less/shift_dashboard.less deleted file mode 100644 index 60f8a66a4..000000000 --- a/hr_employee_shift/static/src/less/shift_dashboard.less +++ /dev/null @@ -1,18 +0,0 @@ -@dashboard-bg-color: white; - -.o_kanban_view.o_kanban_dashboard.o_shift_kanban { - @sale-table-spacing: 20px; - - .o_kanban_record { - min-height: 150px; - max-width: 250px !important; - @media (min-width: @screen-sm-min) { - min-width: 20px; - - } - } - .oe_kanban_content{ - padding-top: 50px!important; - } - -} \ No newline at end of file diff --git a/hr_employee_shift/views/hr_employee_contract_view.xml b/hr_employee_shift/views/hr_employee_contract_view.xml deleted file mode 100644 index 6b5625b7a..000000000 --- a/hr_employee_shift/views/hr_employee_contract_view.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - employee.contract - hr.contract - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hr_employee_shift/views/hr_employee_shift_view.xml b/hr_employee_shift/views/hr_employee_shift_view.xml deleted file mode 100644 index abc754fe5..000000000 --- a/hr_employee_shift/views/hr_employee_shift_view.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - hr.employee.resource - hr.employee - - - - - - - - - - resource.calendar - resource.calendar - - - - - - - - - - - - - - - employee.shift.kanban - resource.calendar - - - - - -
- -
-
-
-
-
- -
-
-
- -
- [] -
-
-
-
-
-
-
-
-
- - - Shift Working Time - resource.calendar - form - kanban,tree,form - - - -

- Define working hours and time table that could be scheduled to your project members -

-
-
- - - -
-
\ No newline at end of file diff --git a/hr_employee_shift/views/hr_generate_shift_view.xml b/hr_employee_shift/views/hr_generate_shift_view.xml deleted file mode 100644 index 63d411109..000000000 --- a/hr_employee_shift/views/hr_generate_shift_view.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - hr_employee_shift_generate_schedule form - hr.shift.generate - -
- - - - - - - - - - - - - - -
-
-
- -
-
-
- - - - Employee Shift - hr.shift.generate - form - new - - - - - - -
-
\ No newline at end of file diff --git a/hr_employee_shift/views/templates.xml b/hr_employee_shift/views/templates.xml deleted file mode 100644 index 6768c74e2..000000000 --- a/hr_employee_shift/views/templates.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/hr_insurance/README.rst b/hr_insurance/README.rst deleted file mode 100644 index f5cae3780..000000000 --- a/hr_insurance/README.rst +++ /dev/null @@ -1,39 +0,0 @@ -OHRMS Employee Insurance Management v10 -======================================= - -Employee insurance management for Open HRMS. - -Depends -======= -[hr] addon Odoo - -Tech -==== -* [Python] - Models -* [XML] - Odoo views - -Installation -============ -- www.odoo.com/documentation/10.0/setup/install.html -- Install our custom addon - - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- - -Developer: Treesa Maria Jude @ cybrosys, treesa@cybrosys.in - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_insurance/RELEASE_NOTES.md b/hr_insurance/RELEASE_NOTES.md deleted file mode 100644 index 97c725f14..000000000 --- a/hr_insurance/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_insurance - -#### 21.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_insurance/__init__.py b/hr_insurance/__init__.py deleted file mode 100644 index 1609385da..000000000 --- a/hr_insurance/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models diff --git a/hr_insurance/__manifest__.py b/hr_insurance/__manifest__.py deleted file mode 100644 index 7aff1a7f0..000000000 --- a/hr_insurance/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - 'name': 'Open HRMS Employee Insurance', - 'version': '11.0.1.0.0', - 'summary': """Employee Insurance Management for Open HRMS.""", - 'description': """Manages insurance amounts for employees to be deducted from salary""", - 'category': 'Human Resources', - 'author': 'Cybrosys Techno solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': 'https://www.openhrms.com', - 'depends': [ - 'base', 'hr', 'hr_payroll', - ], - 'data': [ - 'security/ir.model.access.csv', - 'security/hr_insurance_security.xml', - 'views/employee_insurance_view.xml', - 'views/insurance_salary_stucture.xml', - 'views/policy_management.xml', - ], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_insurance/models/__init__.py b/hr_insurance/models/__init__.py deleted file mode 100644 index d83103344..000000000 --- a/hr_insurance/models/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import policy_details -from . import employee_insurance diff --git a/hr_insurance/models/__init__.pyc b/hr_insurance/models/__init__.pyc deleted file mode 100644 index f1be60292..000000000 Binary files a/hr_insurance/models/__init__.pyc and /dev/null differ diff --git a/hr_insurance/models/employee_insurance.py b/hr_insurance/models/employee_insurance.py deleted file mode 100644 index 3af541f43..000000000 --- a/hr_insurance/models/employee_insurance.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import time -from datetime import datetime -from dateutil import relativedelta -from odoo import models, fields, api, _ - - -class EmployeeInsurance(models.Model): - _name = 'hr.insurance' - _description = 'HR Insurance' - _rec_name = 'employee_id' - - employee_id = fields.Many2one('hr.employee', string='Employee', required=True) - policy_id = fields.Many2one('insurance.policy', string='Policy', required=True) - amount = fields.Float(string='Policy Amount', required=True) - sum_insured = fields.Float(string="Sum Insured", required=True) - policy_coverage = fields.Selection([('monthly', 'Monthly'), ('yearly', 'Yearly')], - required=True, default='monthly', - string='Policy Coverage',) - date_from = fields.Date(string='Date From', - default=time.strftime('%Y-%m-%d'), readonly=True) - date_to = fields.Date(string='Date To', readonly=True, - default=str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10]) - state = fields.Selection([('active', 'Active'), - ('expired', 'Expired'), ], - default='active', string="State",compute='get_status') - company_id = fields.Many2one('res.company', string='Company', required=True, - default=lambda self: self.env.user.company_id) - - def get_status(self): - current_datetime = datetime.now() - for i in self: - x = datetime.strptime(i.date_from, '%Y-%m-%d') - y = datetime.strptime(i.date_to, '%Y-%m-%d') - if x <= current_datetime and y >= current_datetime: - i.state = 'active' - - else: - i.state = 'expired' - - @api.constrains('policy_coverage') - @api.onchange('policy_coverage') - def get_policy_period(self): - - if self.policy_coverage == 'monthly': - self.date_to = str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10] - if self.policy_coverage == 'yearly': - self.date_to = str(datetime.now() + relativedelta.relativedelta(months=+12))[:10] - - -class HrInsurance(models.Model): - _inherit = 'hr.employee' - - insurance_percentage = fields.Float(string="Company Percentage ") - deduced_amount_per_month = fields.Float(string="Salary deduced per month", compute="get_deduced_amount") - deduced_amount_per_year = fields.Float(string="Salary deduced per year", compute="get_deduced_amount") - insurance = fields.One2many('hr.insurance', 'employee_id', string="Insurance", - domain=[('state', '=', 'active')]) - - def get_deduced_amount(self): - current_datetime = datetime.now() - for emp in self: - ins_amount = 0 - for ins in emp.insurance: - - x = datetime.strptime(ins.date_from, '%Y-%m-%d') - y = datetime.strptime(ins.date_to, '%Y-%m-%d') - if x < current_datetime and y > current_datetime: - if ins.policy_coverage == 'monthly': - - ins_amount = ins_amount + (ins.amount*12) - else: - - ins_amount = ins_amount + ins.amount - - emp.deduced_amount_per_year = ins_amount-((ins_amount*emp.insurance_percentage)/100) - emp.deduced_amount_per_month = emp.deduced_amount_per_year/12 - - -class InsuranceRuleInput(models.Model): - _inherit = 'hr.payslip' - - # insurance_amount = fields.Float("Insurance amount", compute='get_inputs') - - def get_inputs(self, contract_ids, date_from, date_to): - """This Compute the other inputs to employee payslip. - """ - res = super(InsuranceRuleInput, self).get_inputs(contract_ids, date_from, date_to) - - contract_obj = self.env['hr.contract'] - for i in contract_ids: - if contract_ids[0]: - emp_id = contract_obj.browse(i[0].id).employee_id - for result in res: - if emp_id.deduced_amount_per_month != 0 and result.get('code') == 'INSUR': - result['amount'] = emp_id.deduced_amount_per_month - return res - diff --git a/hr_insurance/models/employee_insurance.pyc b/hr_insurance/models/employee_insurance.pyc deleted file mode 100644 index 5fd511ca9..000000000 Binary files a/hr_insurance/models/employee_insurance.pyc and /dev/null differ diff --git a/hr_insurance/models/policy_details.py b/hr_insurance/models/policy_details.py deleted file mode 100644 index 0b0b07866..000000000 --- a/hr_insurance/models/policy_details.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import models, fields, api - - -class InsurancePolicy(models.Model): - _name = 'insurance.policy' - - name = fields.Char(string='Name', required=True) - note_field = fields.Html(string='Comment') - company_id = fields.Many2one('res.company', string='Company', required=True, - default=lambda self: self.env.user.company_id) diff --git a/hr_insurance/models/policy_details.pyc b/hr_insurance/models/policy_details.pyc deleted file mode 100644 index 3918bddb3..000000000 Binary files a/hr_insurance/models/policy_details.pyc and /dev/null differ diff --git a/hr_insurance/security/hr_insurance_security.xml b/hr_insurance/security/hr_insurance_security.xml deleted file mode 100644 index e96c9cb84..000000000 --- a/hr_insurance/security/hr_insurance_security.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - Hr Insurancy Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Hr Insurance Policy company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - \ No newline at end of file diff --git a/hr_insurance/security/ir.model.access.csv b/hr_insurance/security/ir.model.access.csv deleted file mode 100644 index 030098bdb..000000000 --- a/hr_insurance/security/ir.model.access.csv +++ /dev/null @@ -1,8 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink - -access_hr_insurance_policy_officer,hr.insurance_policy.officer,hr_insurance.model_insurance_policy,hr.group_hr_user,1,1,1,1 -access_hr_insurance_policy_employee,hr.insurance_policy.employee,hr_insurance.model_insurance_policy,hr.group_hr_manager,1,1,1,1 -access_hr_insurance_policy_manager,hr.insurance_policy.manager,hr_insurance.model_insurance_policy,base.group_user,1,0,0,0 -access_hr_insurance_officer,hr.insurance.officer,hr_insurance.model_hr_insurance,hr.group_hr_user,1,1,1,1 -access_hr_insurance_employee,hr.insurance.employee,hr_insurance.model_hr_insurance,hr.group_hr_manager,1,1,1,1 -access_hr_insurance_manager,hr.insurance.manager,hr_insurance.model_hr_insurance,base.group_user,1,0,0,0 diff --git a/hr_insurance/static/description/HRMS-BUTTON.png b/hr_insurance/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_insurance/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_insurance/static/description/banner.jpg b/hr_insurance/static/description/banner.jpg deleted file mode 100644 index f64af7d11..000000000 Binary files a/hr_insurance/static/description/banner.jpg and /dev/null differ diff --git a/hr_insurance/static/description/cybro-service.png b/hr_insurance/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_insurance/static/description/cybro-service.png and /dev/null differ diff --git a/hr_insurance/static/description/cybro_logo.png b/hr_insurance/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_insurance/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_insurance/static/description/employee.png b/hr_insurance/static/description/employee.png deleted file mode 100644 index b3241d3fb..000000000 Binary files a/hr_insurance/static/description/employee.png and /dev/null differ diff --git a/hr_insurance/static/description/icon.png b/hr_insurance/static/description/icon.png deleted file mode 100644 index b65b2782f..000000000 Binary files a/hr_insurance/static/description/icon.png and /dev/null differ diff --git a/hr_insurance/static/description/index.html b/hr_insurance/static/description/index.html deleted file mode 100644 index eb55e19a3..000000000 --- a/hr_insurance/static/description/index.html +++ /dev/null @@ -1,120 +0,0 @@ -
-
-
-

OpenHRMS

-

Most advanced open source HR management software

-
- - -
-
-
-
-
-
- - - - -
-
- -
-
- -
-
-

OHRMS Employee Insurance Management

-

Employee Insurance Management for OHRMS

-

Cybrosys Technologies , www.cybrosys.com

-

- This module allows tracking the insurance details allowed for employees. Also - efficiently manages the insurance allowances with the salary. You can manage - the percentage of insurance amount to be deduced from the salary. -

-
-
- -
-
-

Set Insurance For Employees

-
- -
-
-
- -
-
-
-
- - -
-
-

Policy Management

- -
-
- -
-
- -
-
- - -
-
-
-

Employee Insurance Details

- -
-
-
- -
-
-
- -
-
-
-

Amount Deduced On Payslip

-
-
-
- -
-
-
- -
-
-

Our Odoo Services

- - -
- -
- -
-

Need Any Help?

- -
- - diff --git a/hr_insurance/static/description/insurance.png b/hr_insurance/static/description/insurance.png deleted file mode 100644 index 884b58383..000000000 Binary files a/hr_insurance/static/description/insurance.png and /dev/null differ diff --git a/hr_insurance/static/description/payslip.png b/hr_insurance/static/description/payslip.png deleted file mode 100644 index defd554be..000000000 Binary files a/hr_insurance/static/description/payslip.png and /dev/null differ diff --git a/hr_insurance/static/description/policy.png b/hr_insurance/static/description/policy.png deleted file mode 100644 index 1601f33af..000000000 Binary files a/hr_insurance/static/description/policy.png and /dev/null differ diff --git a/hr_insurance/views/employee_insurance_view.xml b/hr_insurance/views/employee_insurance_view.xml deleted file mode 100644 index af2fc270c..000000000 --- a/hr_insurance/views/employee_insurance_view.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - hr.employee.Insurance_form - hr.employee - - - - - - - % - - - - - - - - - - - - - - - - - - Employee Insurance - hr.insurance - -
-
- -
- - - - - - - - - - - - - - - - - - -
-
-
- - Employee Insurance - hr.insurance - - - - - - - - - - - - - - - Employee Insurance - hr.insurance - form - tree,form - -

- You have'nt created any policy yet. -

-
-
- - - - -
-
\ No newline at end of file diff --git a/hr_insurance/views/insurance_salary_stucture.xml b/hr_insurance/views/insurance_salary_stucture.xml deleted file mode 100644 index 46d8b7285..000000000 --- a/hr_insurance/views/insurance_salary_stucture.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - INSUR - Insurance Amount - - code - result = -(inputs.INSUR.amount) - - - - - - INSUR - Insurance Amount - - - - - - - \ No newline at end of file diff --git a/hr_insurance/views/policy_management.xml b/hr_insurance/views/policy_management.xml deleted file mode 100644 index 1766e5e3c..000000000 --- a/hr_insurance/views/policy_management.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Insurance Policy Details - insurance.policy - -
- - - - - - - - - - - - - - - - - - -
-
-
- - Insurance Policy Details - insurance.policy - - - - - - - - - Insurance Policy - insurance.policy - form - tree,form - -

- You have'nt created any policy yet. -

-
-
- - -
-
- diff --git a/hr_leave_request_aliasing/README.md b/hr_leave_request_aliasing/README.md deleted file mode 100644 index bbebcea82..000000000 --- a/hr_leave_request_aliasing/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Open HRMS Leave Request Aliasing --------------------------------- -Supporting Addon for Open HRMS, Allows You To Create Leave Request Automatically From Incoming Emails. - -Connect with experts --------------------- - -If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. - -Technical Notes ---------------- - -Here you need to send leave request through email with the following rules. -* You must send leave request through your registered email id. -* Mail subject must be start with 'LEAVE REQUEST ' -* Mail body must contain date as per given format (%d/%m/%Y) - -Contacts --------- -info - info@cybrosys.com -Jesni Banu - jesni@cybrosys.in - -Website: -https://www.openhrms.com -https://www.cybrosys.com diff --git a/hr_leave_request_aliasing/__init__.py b/hr_leave_request_aliasing/__init__.py deleted file mode 100644 index b579ce91c..000000000 --- a/hr_leave_request_aliasing/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import models - - diff --git a/hr_leave_request_aliasing/__manifest__.py b/hr_leave_request_aliasing/__manifest__.py deleted file mode 100644 index 7dcaee642..000000000 --- a/hr_leave_request_aliasing/__manifest__.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': 'Open HRMS Leave Request Aliasing', - 'version': '11.0.1.0.0', - 'summary': """Allows You To Create Leave Request Automatically From Incoming Mails""", - 'description': 'This module allows you to create leave request directly from incoming mails.', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base_setup', 'hr_holidays'], - 'data': [ - 'data/web_planner_data.xml', - 'views/hr_leave_template.xml', - 'views/leave_request_alias_view.xml', - 'views/res_config_views.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_leave_request_aliasing/data/web_planner_data.xml b/hr_leave_request_aliasing/data/web_planner_data.xml deleted file mode 100644 index c21ce1667..000000000 --- a/hr_leave_request_aliasing/data/web_planner_data.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - Leave strategy planner - - - planner_hr_leave - - - - diff --git a/hr_leave_request_aliasing/doc/RELEASE_NOTES.md b/hr_leave_request_aliasing/doc/RELEASE_NOTES.md deleted file mode 100644 index d8cbf249f..000000000 --- a/hr_leave_request_aliasing/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 24.03.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/hr_leave_request_aliasing/models/__init__.py b/hr_leave_request_aliasing/models/__init__.py deleted file mode 100644 index 79435f83b..000000000 --- a/hr_leave_request_aliasing/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import leave_request_alias -from . import res_config -from . import web_planner - - diff --git a/hr_leave_request_aliasing/models/__init__.pyc b/hr_leave_request_aliasing/models/__init__.pyc deleted file mode 100644 index e57e06aa2..000000000 Binary files a/hr_leave_request_aliasing/models/__init__.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/__pycache__/__init__.cpython-35.pyc b/hr_leave_request_aliasing/models/__pycache__/__init__.cpython-35.pyc deleted file mode 100644 index 0e1b707d6..000000000 Binary files a/hr_leave_request_aliasing/models/__pycache__/__init__.cpython-35.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/__pycache__/leave_request_alias.cpython-35.pyc b/hr_leave_request_aliasing/models/__pycache__/leave_request_alias.cpython-35.pyc deleted file mode 100644 index 9bcfd4d4a..000000000 Binary files a/hr_leave_request_aliasing/models/__pycache__/leave_request_alias.cpython-35.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/__pycache__/res_config.cpython-35.pyc b/hr_leave_request_aliasing/models/__pycache__/res_config.cpython-35.pyc deleted file mode 100644 index c4b0aa136..000000000 Binary files a/hr_leave_request_aliasing/models/__pycache__/res_config.cpython-35.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/__pycache__/web_planner.cpython-35.pyc b/hr_leave_request_aliasing/models/__pycache__/web_planner.cpython-35.pyc deleted file mode 100644 index f69ca2b3b..000000000 Binary files a/hr_leave_request_aliasing/models/__pycache__/web_planner.cpython-35.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/leave_request_alias.py b/hr_leave_request_aliasing/models/leave_request_alias.py deleted file mode 100644 index 2e326c22b..000000000 --- a/hr_leave_request_aliasing/models/leave_request_alias.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -import re -from datetime import datetime, timedelta -from odoo import models, api -from odoo.tools import email_split - - -class HrLeaveAlias(models.Model): - _inherit = 'hr.holidays' - - @api.model - def message_new(self, msg_dict, custom_values=None): - """This function extracts required fields of hr.holidays from incoming mail then creating records""" - try: - if custom_values is None: - custom_values = {} - msg_subject = msg_dict.get('subject', '') - subject = re.search('LEAVE REQUEST', msg_subject) - if subject is not None: - email_address = email_split(msg_dict.get('email_from', False))[0] - employee = self.env['hr.employee'].sudo().search([ - '|', - ('work_email', 'ilike', email_address), - ('user_id.email', 'ilike', email_address) - ], limit=1) - msg_body = msg_dict.get('body', '') - cleaner = re.compile('<.*?>') - clean_msg_body = re.sub(cleaner, '', msg_body) - date_list = re.findall(r'\d{2}/\d{2}/\d{4}', clean_msg_body) - if len(date_list) > 0: - date_from = date_list[0] - if len(date_list) > 1: - start_date = datetime.strptime(date_list[1], '%d/%m/%Y') - date_to = start_date + timedelta(days=0) - else: - start_date = datetime.strptime(date_list[0], '%d/%m/%Y') - date_to = start_date + timedelta(days=1) - no_of_days_temp = (datetime.strptime(str(date_to), "%Y-%m-%d %H:%M:%S") - - datetime.strptime(date_from, '%d/%m/%Y')).days - custom_values.update({ - 'name': msg_subject.strip(), - 'employee_id': employee.id, - 'holiday_status_id': 1, - 'date_from': date_from, - 'date_to': date_to, - 'no_of_days_temp': no_of_days_temp - }) - return super(HrLeaveAlias, self).message_new(msg_dict, custom_values) - except: - pass - - diff --git a/hr_leave_request_aliasing/models/leave_request_alias.pyc b/hr_leave_request_aliasing/models/leave_request_alias.pyc deleted file mode 100644 index 20a57a492..000000000 Binary files a/hr_leave_request_aliasing/models/leave_request_alias.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/res_config.py b/hr_leave_request_aliasing/models/res_config.py deleted file mode 100644 index 58df9c676..000000000 --- a/hr_leave_request_aliasing/models/res_config.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo import api, fields, models - - -class HrLeaveConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' - - alias_prefix = fields.Char(string='Default Alias Name for Leave', help='Default Alias Name for Leave') - alias_domain = fields.Char(string='Alias Domain', help='Default Alias Domain for Leave', - default=lambda self: self.env["ir.config_parameter"].get_param("mail.catchall.domain")) - - def set_values(self): - super(HrLeaveConfigSettings, self).set_values() - set_param = self.env['ir.config_parameter'].set_param - set_param('alias_prefix', self.alias_prefix) - set_param('alias_domain', self.alias_domain ) - - @api.model - def get_values(self): - res = super(HrLeaveConfigSettings, self).get_values() - get_param = self.env['ir.config_parameter'].sudo().get_param - res.update( - alias_prefix=get_param('alias_prefix', default=''), - alias_domain=get_param('alias_domain', default=''), - ) - return res - diff --git a/hr_leave_request_aliasing/models/res_config.pyc b/hr_leave_request_aliasing/models/res_config.pyc deleted file mode 100644 index f9621da98..000000000 Binary files a/hr_leave_request_aliasing/models/res_config.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/models/web_planner.py b/hr_leave_request_aliasing/models/web_planner.py deleted file mode 100644 index e62a026d5..000000000 --- a/hr_leave_request_aliasing/models/web_planner.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo import api, models - - -class PlannerHrLeave(models.Model): - """This class is used to activate web.planner feature in 'hr_leave_request_aliasing' module""" - - _inherit = 'web.planner' - - @api.model - def _get_planner_application(self): - planner = super(PlannerHrLeave, self)._get_planner_application() - planner.append(['planner_hr_leave', 'Leave Planner']) - return planner - - @api.model - def _prepare_planner_hr_leave_data(self): - alias_record = self.env.ref('hr_leave_request_aliasing.mail_alias_leave') - return { - 'alias_domain': alias_record.alias_domain, - 'alias_name': alias_record.alias_name, - } - diff --git a/hr_leave_request_aliasing/models/web_planner.pyc b/hr_leave_request_aliasing/models/web_planner.pyc deleted file mode 100644 index 8a7a9c706..000000000 Binary files a/hr_leave_request_aliasing/models/web_planner.pyc and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/HRMS-BUTTON.png b/hr_leave_request_aliasing/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_leave_request_aliasing/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/banner.jpg b/hr_leave_request_aliasing/static/description/banner.jpg deleted file mode 100644 index 06286d846..000000000 Binary files a/hr_leave_request_aliasing/static/description/banner.jpg and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/cybro-service.png b/hr_leave_request_aliasing/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_leave_request_aliasing/static/description/cybro-service.png and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/cybro_logo.png b/hr_leave_request_aliasing/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_leave_request_aliasing/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/icon.png b/hr_leave_request_aliasing/static/description/icon.png deleted file mode 100644 index 2ebe3a208..000000000 Binary files a/hr_leave_request_aliasing/static/description/icon.png and /dev/null differ diff --git a/hr_leave_request_aliasing/static/description/index.html b/hr_leave_request_aliasing/static/description/index.html deleted file mode 100644 index 6c368f8a3..000000000 --- a/hr_leave_request_aliasing/static/description/index.html +++ /dev/null @@ -1,102 +0,0 @@ -
-
-

Open HRMS

-

Most advanced open source HR management software

-
-
- -
-
-
-
- - - -
-
-
-
- -
-
-

Open HRMS Leave Request Aliasing

-

Creating Leave Request, Automatically From Incoming Emails

-

Cybrosys Technologies

-
-
-

Features:

-
- Automation on Leaves Request Mails.
- Option to Set Aliasing Domain Separately for Leave Request.
-
-
-
- -
-
-
-

Overview

-

- Email aliasing is a default feature in Odoo which allows the user to fetch contents to ERP records directly from incoming emails. - The feature is a type of automation. Since we can configure the E-mails to fetch contents directly. - So here we are providing one of the new module to create leave request automatically from incoming email. -

-
-
-
- -
-
-
-
- -
- - Here we can send leave request through our registered email id. Then it will create leave - request in Odoo. We must ensure that our mail subject must start with 'LEAVE REQUEST ' and date - format must be as '%d/%m/%Y'. - -
-
-
- - -
-
-

Our Odoo Services

-
-
-
- - - -
-
-
- -
-

Need Any Help?

- -
\ No newline at end of file diff --git a/hr_leave_request_aliasing/static/description/mail_aliasing.png b/hr_leave_request_aliasing/static/description/mail_aliasing.png deleted file mode 100644 index 5b499b18a..000000000 Binary files a/hr_leave_request_aliasing/static/description/mail_aliasing.png and /dev/null differ diff --git a/hr_leave_request_aliasing/static/src/js/web_planner_hr_leave.js b/hr_leave_request_aliasing/static/src/js/web_planner_hr_leave.js deleted file mode 100644 index f05102334..000000000 --- a/hr_leave_request_aliasing/static/src/js/web_planner_hr_leave.js +++ /dev/null @@ -1,6 +0,0 @@ -odoo.define('planner_hr_leave.planner', function (require) { -"use strict"; - -var planner = require('web.planner.common'); - -}); diff --git a/hr_leave_request_aliasing/views/hr_leave_template.xml b/hr_leave_request_aliasing/views/hr_leave_template.xml deleted file mode 100644 index 46bd54628..000000000 --- a/hr_leave_request_aliasing/views/hr_leave_template.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/hr_leave_request_aliasing/views/leave_request_alias_view.xml b/hr_leave_request_aliasing/views/leave_request_alias_view.xml deleted file mode 100644 index f4430dc30..000000000 --- a/hr_leave_request_aliasing/views/leave_request_alias_view.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - leave - - - employees - - diff --git a/hr_leave_request_aliasing/views/res_config_views.xml b/hr_leave_request_aliasing/views/res_config_views.xml deleted file mode 100644 index ac02c9c68..000000000 --- a/hr_leave_request_aliasing/views/res_config_views.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Configure Leave - res.config.settings - - - - -
-

Leaves

-
-
-
-
-
-
-
-
-
-
- - - Leaves Config - ir.actions.act_window - res.config.settings - form - inline - {'module' : 'hr_leave_request_aliasing'} - - - -
-
diff --git a/hr_payslip_monthly_report/README.rst b/hr_payslip_monthly_report/README.rst deleted file mode 100644 index 05daa3a00..000000000 --- a/hr_payslip_monthly_report/README.rst +++ /dev/null @@ -1,14 +0,0 @@ -Payroll-Payslip Reporting v11 -============================= -This Module help Human resource managers to get a over all view for the payslips as pivot. - -Features -======== - -* Pivot view for HR payslips. -* Group By options like Employee wise, department wise, job title wise, date wise, status wise and Company wise. -* Spot Export to XLS Report. - -Credits -======= -Nikhil Krishnan @ cybrosys, nikhil@cybrosys.in \ No newline at end of file diff --git a/hr_payslip_monthly_report/__init__.py b/hr_payslip_monthly_report/__init__.py deleted file mode 100644 index 4eb511d10..000000000 --- a/hr_payslip_monthly_report/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nikhil krishnan() -# 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 . import models diff --git a/hr_payslip_monthly_report/__manifest__.py b/hr_payslip_monthly_report/__manifest__.py deleted file mode 100644 index 2ae032f9d..000000000 --- a/hr_payslip_monthly_report/__manifest__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nikhil krishnan() -# 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': 'Payroll-Payslip Reporting', - 'version': '11.0.1.0.0', - 'summary': """Payslip Pivot View Report.""", - 'description': """Payslip monthly report. - This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""", - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': 'https://www.cybrosys.com', - 'category': 'Generic Modules/Human Resources', - 'depends': ['hr_payroll'], - 'license': 'LGPL-3', - 'data': [ - 'security/ir.model.access.csv', - 'views/menu_payslip_report.xml' - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'installable': True, - 'auto_install': False, -} diff --git a/hr_payslip_monthly_report/__manifest__.py~ b/hr_payslip_monthly_report/__manifest__.py~ deleted file mode 100644 index 1a56c822e..000000000 --- a/hr_payslip_monthly_report/__manifest__.py~ +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nikhil krishnan() -# 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': 'Payroll-Payslip Reporting', - 'version': '10.0.1.0.0', - 'summary': """Payslip Pivot View Report.""", - 'description': """Payslip monthly report. - This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""", - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': 'http://www.cybrosys.com', - 'category': 'Human Resources', - 'depends': ['hr_payroll'], - 'license': 'LGPL-3', - 'data': [ - 'security/ir.model.access.csv', - 'views/menu_payslip_report.xml' - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'installable': True, - 'auto_install': False, -} diff --git a/hr_payslip_monthly_report/models/__init__.py b/hr_payslip_monthly_report/models/__init__.py deleted file mode 100644 index ab733466e..000000000 --- a/hr_payslip_monthly_report/models/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nikhil krishnan() -# 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 . import hr_payroll_report - diff --git a/hr_payslip_monthly_report/models/hr_payroll_report.py b/hr_payslip_monthly_report/models/hr_payroll_report.py deleted file mode 100644 index 2c05fcad9..000000000 --- a/hr_payslip_monthly_report/models/hr_payroll_report.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nikhil krishnan() -# 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 odoo import fields, models, tools, api - - -class PayrollReportView(models.Model): - _name = 'hr.payroll.report.view' - _auto = False - - name = fields.Many2one('hr.employee', string='Employee') - date_from = fields.Date(string='From') - date_to = fields.Date(string='To') - state = fields.Selection([('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')], - string='Status') - job_id = fields.Many2one('hr.job', string='Job Title') - company_id = fields.Many2one('res.company', string='Company') - department_id = fields.Many2one('hr.department', string='Department') - net = fields.Float(string='Net Salary') - - def _select(self): - select_str = """ - min(ps.id) as id,emp.id as name,jb.id as job_id, - dp.id as department_id,cmp.id as company_id, - ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state - """ - return select_str - - def _from(self): - from_str = """ - hr_payslip_line psl join hr_payslip ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id) - join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id) - join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where psl.code='NET' - """ - return from_str - - def _group_by(self): - group_by_str = """ - group by emp.id,psl.total,ps.date_from, ps.date_to, ps.state,jb.id,dp.id,cmp.id - """ - return group_by_str - - @api.model_cr - def init(self): - tools.drop_view_if_exists(self.env.cr, self._table) - self.env.cr.execute("""CREATE or REPLACE VIEW %s as ( SELECT - %s - FROM %s - %s - )""" % (self._table, self._select(), self._from(), self._group_by())) - diff --git a/hr_payslip_monthly_report/security/ir.model.access.csv b/hr_payslip_monthly_report/security/ir.model.access.csv deleted file mode 100644 index ed054578d..000000000 --- a/hr_payslip_monthly_report/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_hr_payslip_monthly_report_manager,hr.payroll.report.view,hr_payslip_monthly_report.model_hr_payroll_report_view,hr.group_hr_manager,1,1,1,1 diff --git a/hr_payslip_monthly_report/static/description/HR Payslip Report view.png b/hr_payslip_monthly_report/static/description/HR Payslip Report view.png deleted file mode 100644 index c1f9cacf4..000000000 Binary files a/hr_payslip_monthly_report/static/description/HR Payslip Report view.png and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/HR report group by.png b/hr_payslip_monthly_report/static/description/HR report group by.png deleted file mode 100644 index 20f53735c..000000000 Binary files a/hr_payslip_monthly_report/static/description/HR report group by.png and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/Payslip Graph Report.png b/hr_payslip_monthly_report/static/description/Payslip Graph Report.png deleted file mode 100644 index 7c318c474..000000000 Binary files a/hr_payslip_monthly_report/static/description/Payslip Graph Report.png and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/banner.jpg b/hr_payslip_monthly_report/static/description/banner.jpg deleted file mode 100644 index aa8ba62e1..000000000 Binary files a/hr_payslip_monthly_report/static/description/banner.jpg and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/cybro_logo.png b/hr_payslip_monthly_report/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_payslip_monthly_report/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/icon.png b/hr_payslip_monthly_report/static/description/icon.png deleted file mode 100644 index e176696bc..000000000 Binary files a/hr_payslip_monthly_report/static/description/icon.png and /dev/null differ diff --git a/hr_payslip_monthly_report/static/description/index.html b/hr_payslip_monthly_report/static/description/index.html deleted file mode 100644 index ccb8b3cdc..000000000 --- a/hr_payslip_monthly_report/static/description/index.html +++ /dev/null @@ -1,124 +0,0 @@ -
-
-

Payroll-Payslip Reporting

-

Get an overview of the pay slips as pivot

-

Author : Cybrosys Techno Solutions , www.cybrosys.com

-
-

Features:

-
    -
  •    Retrieve pivot view of pay slips.
  • -
  •    Able to get Reports
  • -
      -
    • Employee wise,
    • -
    • Employee's department wise,
    • -
    • Employee's job title wise,
    • -
    • Pay slip's date wise,
    • -
    • Pay slip's status wise,
    • -
    • Company wise.
    • -
    -
  •    Spot Export to XLS Report.
  • -
-
-
-
- -
-
-

Payroll Monthly Statement in Pivot View

-
-
-

- This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group - criteria (Employee, Job title, Department, Company, Pay slip etc.). -

-
-
-
-
- -
-
-

Payroll report as Pivot

-
-
-
- -
-
-
-

- HR managers need a complete payroll statement and also payroll monthly statement. From - this pivot view we can easily generate the custom payroll report views in excel format. Also - we can download it from there. From Odoo payroll report we can get only individual employee - pay slip reports. To make the use of HR payroll management system easier we can use this pivot - view to get the payroll/pay slip statement. -

-
- -
-
-
- -
-
-

Group by the pivot view

-
-
-
- -
-
-
-

- In this View we can easily generate custom reports by using the + button, - That is we can make the filters by groups, also we can get the counts too, from the "Measures" Button -

-
-
-
-
- -
-
-

Graph View

-
-
-
- -
-
-
-

- In Pivot view we can easily generate custom Graphs like Pie Chart,Bar Chart, Line Chart. - With date and net salary or date and pay slip's counts. -

-
-
-
-
- -
-

Need Any Help?

- -
diff --git a/hr_payslip_monthly_report/views/menu_payslip_report.xml b/hr_payslip_monthly_report/views/menu_payslip_report.xml deleted file mode 100644 index 428aad9fb..000000000 --- a/hr_payslip_monthly_report/views/menu_payslip_report.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - hr.payslip.pivot - hr.payroll.report.view - - - - - - - - - - - hr.payslip.graph - hr.payroll.report.view - - - - - - - - - - hr.payslip.search - hr.payroll.report.view - - - - - - - - - - - - - - - - - - - - - - - - hr.payroll.report.view - Payslips - form - pivot,graph - {'search_default_year':1} - This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group - criteria (Employee, Job title, Department, Company, Pay slip etc.). - - - - - - diff --git a/hr_payslip_monthly_report/views/quotation_handler.xml~ b/hr_payslip_monthly_report/views/quotation_handler.xml~ deleted file mode 100644 index 8c0e414d9..000000000 --- a/hr_payslip_monthly_report/views/quotation_handler.xml~ +++ /dev/null @@ -1,112 +0,0 @@ - - - - - Revised Quotation Orders - sale.order - form - tree,form - - [('parent_so_id', '=', active_id)] - -

- Revised order against this Quotation Order. -

-
-
- - - - - Sales Orders - ir.actions.act_window - sale.order - form - tree,kanban,form,calendar,pivot,graph - - {} - [('state', 'not in', ('draft','revised','sent', 'cancel'))] - -

- Create a Quotation, the first step of a new sale. -

- Once the quotation is confirmed, it becomes a sales order. - You'll be able to invoice it and collect payments. - From the Sales Orders menu, you can track delivery - orders or services. -

-
-
- - - Quotations - ir.actions.act_window - sale.order - form - - tree,kanban,form,calendar,pivot,graph - {} - [('state','in',('pre','draft','sent','cancel'))] - - -

- Create a Quotation, the first step of a new sale. -

- Your next actions should flow efficiently: confirm the Quotation - to a Sale Order, then create the Invoice and collect the Payment. -

- Note that once a Quotation becomes a Sale Order, it will be moved - from the Quotations list to the Sales Order list. -

-
-
- - - sale.order.form - sale.order - - - - - - - - {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} - - - - {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} - - - - {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} - - - - {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} - - - - - - sale.order.tree - sale.order - - - - - - - -
-
\ No newline at end of file diff --git a/hr_reminder/README.rst b/hr_reminder/README.rst deleted file mode 100644 index 2fe35cf95..000000000 --- a/hr_reminder/README.rst +++ /dev/null @@ -1,39 +0,0 @@ -Open HRMS Reminders Todo V11 -============================ - -HR Reminder For OHRMS - -Depends -======= -[hr] addon Odoo - -Tech -==== -* [Python] - Models -* [XML] - Odoo views - -Installation -============ -- www.odoo.com/documentation/10.0/setup/install.html -- Install our custom addon - - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- - -Developer: Treesa Maria Jude @ cybrosys, treesa@cybrosys.in - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_reminder/__init__.py b/hr_reminder/__init__.py deleted file mode 100644 index a84ea577e..000000000 --- a/hr_reminder/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models -from . import controllers diff --git a/hr_reminder/__manifest__.py b/hr_reminder/__manifest__.py deleted file mode 100644 index 879e340c4..000000000 --- a/hr_reminder/__manifest__.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': 'Open HRMS Reminders Todo', - 'version': '11.0.1.0.0', - 'category': 'Extra Tools', - 'summary': 'HR Reminder For OHRMS', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr'], - 'data': [ - 'security/ir.model.access.csv', - 'security/hr_reminder_security.xml', - 'views/hr_reminder_view.xml', - 'views/reminder_template.xml', - ], - 'qweb': [ - 'static/src/xml/reminder_topbar.xml', ], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_reminder/controllers/__init__.py b/hr_reminder/controllers/__init__.py deleted file mode 100644 index 948e84ff6..000000000 --- a/hr_reminder/controllers/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import main diff --git a/hr_reminder/controllers/__init__.pyc b/hr_reminder/controllers/__init__.pyc deleted file mode 100644 index 9c37f9961..000000000 Binary files a/hr_reminder/controllers/__init__.pyc and /dev/null differ diff --git a/hr_reminder/controllers/main.py b/hr_reminder/controllers/main.py deleted file mode 100644 index bfb960dee..000000000 --- a/hr_reminder/controllers/main.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import http -from odoo.http import request - - -class Reminders(http.Controller): - - @http.route('/hr_reminder/all_reminder', type='json', auth="public") - def all_reminder(self): - reminder = [] - for i in request.env['hr.reminder'].search([]): - if i.reminder_active: - reminder.append(i.name) - return reminder - - @http.route('/hr_reminder/reminder_active', type='json', auth="public") - def reminder_active(self, **kwargs): - reminder_value = kwargs.get('reminder_name') - value = [] - - for i in request.env['hr.reminder'].search([('name', '=', reminder_value)]): - value.append(i.model_name.model) - value.append(i.model_field.name) - value.append(i.search_by) - value.append(i.date_set) - value.append(i.date_from) - value.append(i.date_to) - # value.append(i.exclude_year) - return value diff --git a/hr_reminder/controllers/main.pyc b/hr_reminder/controllers/main.pyc deleted file mode 100644 index 74921027c..000000000 Binary files a/hr_reminder/controllers/main.pyc and /dev/null differ diff --git a/hr_reminder/controllers/time_reminder.py b/hr_reminder/controllers/time_reminder.py deleted file mode 100644 index 4dd40e492..000000000 --- a/hr_reminder/controllers/time_reminder.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -import werkzeug - -from odoo.api import Environment -import odoo.http as http - -from odoo.http import request -from odoo import SUPERUSER_ID -from odoo import registry as registry_get - - -class CalendarController(http.Controller): - - @http.route('/calendar/meeting/accept', type='http', auth="calendar") - def accept(self, db, token, action, id, **kwargs): - registry = registry_get(db) - with registry.cursor() as cr: - env = Environment(cr, SUPERUSER_ID, {}) - attendee = env['calendar.attendee'].search([('access_token', '=', token), ('state', '!=', 'accepted')]) - if attendee: - attendee.do_accept() - return self.view(db, token, action, id, view='form') - - @http.route('/calendar/meeting/decline', type='http', auth="calendar") - def declined(self, db, token, action, id): - registry = registry_get(db) - with registry.cursor() as cr: - env = Environment(cr, SUPERUSER_ID, {}) - attendee = env['calendar.attendee'].search([('access_token', '=', token), ('state', '!=', 'declined')]) - if attendee: - attendee.do_decline() - return self.view(db, token, action, id, view='form') - - @http.route('/calendar/meeting/view', type='http', auth="calendar") - def view(self, db, token, action, id, view='calendar'): - registry = registry_get(db) - with registry.cursor() as cr: - # Since we are in auth=none, create an env with SUPERUSER_ID - env = Environment(cr, SUPERUSER_ID, {}) - attendee = env['calendar.attendee'].search([('access_token', '=', token)]) - timezone = attendee.partner_id.tz - lang = attendee.partner_id.lang or 'en_US' - event = env['calendar.event'].with_context(tz=timezone, lang=lang).browse(int(id)) - - # If user is logged, redirect to form view of event - # otherwise, display the simplifyed web page with event informations - if request.session.uid: - return werkzeug.utils.redirect('/web?db=%s#id=%s&view_type=form&model=calendar.event' % (db, id)) - - # NOTE : we don't use request.render() since: - # - we need a template rendering which is not lazy, to render before cursor closing - # - we need to display the template in the language of the user (not possible with - # request.render()) - return env['ir.ui.view'].with_context(lang=lang).render_template( - 'calendar.invitation_page_anonymous', { - 'event': event, - 'attendee': attendee, - }) - - # Function used, in RPC to check every 5 minutes, if notification to do for an event or not - @http.route('/calendar/notify', type='json', auth="user") - def notify(self): - return request.env['calendar.alarm_manager'].get_next_notif() - - @http.route('/calendar/notify_ack', type='json', auth="user") - def notify_ack(self, type=''): - return request.env['res.partner']._set_calendar_last_notif_ack() diff --git a/hr_reminder/docs/RELEASE_NOTES.md b/hr_reminder/docs/RELEASE_NOTES.md deleted file mode 100644 index cd7da7a5d..000000000 --- a/hr_reminder/docs/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_reminder - -#### 21.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_reminder/models/__init__.py b/hr_reminder/models/__init__.py deleted file mode 100644 index 88311d898..000000000 --- a/hr_reminder/models/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import hr_reminder diff --git a/hr_reminder/models/__init__.pyc b/hr_reminder/models/__init__.pyc deleted file mode 100644 index bd044fda7..000000000 Binary files a/hr_reminder/models/__init__.pyc and /dev/null differ diff --git a/hr_reminder/models/hr_reminder.py b/hr_reminder/models/hr_reminder.py deleted file mode 100644 index e9a6f38af..000000000 --- a/hr_reminder/models/hr_reminder.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Treesa Maria Jude () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from datetime import datetime -from odoo import models, fields - - -class HrPopupReminder(models.Model): - _name = 'hr.reminder' - - name = fields.Char(string='Title', required=True) - model_name = fields.Many2one('ir.model', string="Model", required=True, domain="[('model', 'like','hr')]") - model_field = fields.Many2one('ir.model.fields', string='Field', - domain="[('model_id', '=',model_name),('ttype', 'in', ['datetime','date'])]", - required=True) - search_by = fields.Selection([('today', 'Today'), - ('set_period', 'Set Period'), - ('set_date', 'Set Date'), ], - required=True, string="Search By") - days_before = fields.Integer(string='Reminder before') - active = fields.Boolean(string="Active",default=True) - # exclude_year = fields.Boolean(string="Consider day alone") - reminder_active = fields.Boolean(string="Reminder Active") - date_set = fields.Date(string='Select Date') - date_from = fields.Date(string="Start Date") - date_to = fields.Date(string="End Date") - expiry_date = fields.Date(string="Reminder Expiry Date") - company_id = fields.Many2one('res.company', string='Company', required=True, - default=lambda self: self.env.user.company_id) - - def reminder_scheduler(self): - now = fields.Datetime.from_string(fields.Datetime.now()) - today = fields.Date.today() - obj = self.env['hr.reminder'].search([]) - for i in obj: - if i.search_by != "today": - if i.expiry_date and datetime.strptime(today, "%Y-%m-%d") == datetime.strptime(i.expiry_date, "%Y-%m-%d"): - i.active = False - else: - if i.search_by == "set_date": - d1 = datetime.strptime(i.date_set, "%Y-%m-%d") - d2 = datetime.strptime(today, "%Y-%m-%d") - daydiff = abs((d2 - d1).days) - if daydiff <= i.days_before: - i.reminder_active = True - else: - i.reminder_active = False - elif i.search_by == "set_period": - d1 = datetime.strptime(i.date_from, "%Y-%m-%d") - d2 = datetime.strptime(today, "%Y-%m-%d") - daydiff = abs((d2 - d1).days) - if daydiff <= i.days_before: - i.reminder_active = True - else: - i.reminder_active = False - else: - i.reminder_active = True - diff --git a/hr_reminder/models/hr_reminder.pyc b/hr_reminder/models/hr_reminder.pyc deleted file mode 100644 index 8a4d77fbf..000000000 Binary files a/hr_reminder/models/hr_reminder.pyc and /dev/null differ diff --git a/hr_reminder/security/hr_reminder_security.xml b/hr_reminder/security/hr_reminder_security.xml deleted file mode 100644 index 2650c4fa0..000000000 --- a/hr_reminder/security/hr_reminder_security.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Hr Reminder Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - \ No newline at end of file diff --git a/hr_reminder/security/ir.model.access.csv b/hr_reminder/security/ir.model.access.csv deleted file mode 100644 index 46fc9f5d3..000000000 --- a/hr_reminder/security/ir.model.access.csv +++ /dev/null @@ -1,5 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink - -access_hr_reminder_officer,hr.reminder.officer,hr_reminder.model_hr_reminder,hr.group_hr_user,1,1,1,1 -access_hr_reminder_employee,hr.reminder.employee,hr_reminder.model_hr_reminder,hr.group_hr_manager,1,1,1,1 -access_hr_reminder_manager,hr.reminder.manager,hr_reminder.model_hr_reminder,base.group_user,0,0,0,0 diff --git a/hr_reminder/static/description/HRMS-BUTTON.png b/hr_reminder/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_reminder/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_reminder/static/description/banner.jpg b/hr_reminder/static/description/banner.jpg deleted file mode 100644 index 7579d32ea..000000000 Binary files a/hr_reminder/static/description/banner.jpg and /dev/null differ diff --git a/hr_reminder/static/description/cybro-service.png b/hr_reminder/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_reminder/static/description/cybro-service.png and /dev/null differ diff --git a/hr_reminder/static/description/cybro_logo.png b/hr_reminder/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_reminder/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_reminder/static/description/icon.png b/hr_reminder/static/description/icon.png deleted file mode 100644 index cf84f5d5c..000000000 Binary files a/hr_reminder/static/description/icon.png and /dev/null differ diff --git a/hr_reminder/static/description/index.html b/hr_reminder/static/description/index.html deleted file mode 100644 index 4f20373f8..000000000 --- a/hr_reminder/static/description/index.html +++ /dev/null @@ -1,146 +0,0 @@ -
-
-
-

OpenHRMS

-

Most advanced open source HR management software

-
- - -
-
- -
-
-
-
- - - - -
-
- -
-
- - -
-
-

Reminders

-

Cybrosys Technologies , www.cybrosys.com

-

-Reminders is an effective module,helps to memorise all your important dates. We -can set reminders to any model (eg: Sales,HR,Project etc..) and also their corresponding -date fields to compare.This eases the company work load to memorize the special -dates (eg: Expiration date,Deadline date,Assigned Date etc...). -

-
-
- -
-
-

Set Your Reminders

-
-

-

Settings>Pop-up Reminder>Reminder

-

-

Set your reminders for any model and the corresponding date field. - Also this module allows different methods to search.

-

-
-
-
- -
-
-
- - -
-
-

Search By

-
-

We can use 3 methods to search:

-
    -
  •    Today: Compares to the current date.
  • -
  •    Set Date: Compares with the given date.
  • -
  •    Set Period: Reminder is set between a time range(Start date - End date).
  • -
-
-
-
-

Set Date

- -
-
-

Set Period

- -
-
-
- - -
-
-
-

Reminder Button

-

Select the Reminder from the list of Reminders

-
-
-
- -
-
-
- -
-
-
-

Related Result

-
-
-
- -
-
-
- -
-
-

Our Odoo Services

- - -
- -
- - - -
-

Need Any Help?

- -
- - diff --git a/hr_reminder/static/description/popup.png b/hr_reminder/static/description/popup.png deleted file mode 100644 index a2c65d281..000000000 Binary files a/hr_reminder/static/description/popup.png and /dev/null differ diff --git a/hr_reminder/static/description/reminder.png b/hr_reminder/static/description/reminder.png deleted file mode 100644 index 94d091207..000000000 Binary files a/hr_reminder/static/description/reminder.png and /dev/null differ diff --git a/hr_reminder/static/description/result.png b/hr_reminder/static/description/result.png deleted file mode 100644 index 3bf265c9d..000000000 Binary files a/hr_reminder/static/description/result.png and /dev/null differ diff --git a/hr_reminder/static/description/set_date.png b/hr_reminder/static/description/set_date.png deleted file mode 100644 index fa62b5ccd..000000000 Binary files a/hr_reminder/static/description/set_date.png and /dev/null differ diff --git a/hr_reminder/static/description/set_period.png b/hr_reminder/static/description/set_period.png deleted file mode 100644 index a77456ee6..000000000 Binary files a/hr_reminder/static/description/set_period.png and /dev/null differ diff --git a/hr_reminder/static/src/css/notification.css b/hr_reminder/static/src/css/notification.css deleted file mode 100644 index 01f689dd1..000000000 --- a/hr_reminder/static/src/css/notification.css +++ /dev/null @@ -1,32 +0,0 @@ - -.oe_webclient_notification_action t { - color: white; -} -.oe_webclient_notification_action p { - color: white; - margin-top: 1em; -} - .label { - display: inline-block; - color: white; - max-width: 100%; - margin-bottom: 4px; - font-weight: bold; - font-size: larger; -} -.reminder-dropdown { - .o-flex(0, 1, auto); - background: #FFFFFF; - max-height: 400px; - min-height: 50px; - overflow-y: auto; - - @media (max-width: @screen-xs-max) { - max-height: none; - } - -.detail-client-address-country { - color: black; - } - - diff --git a/hr_reminder/static/src/js/reminder_topbar.js b/hr_reminder/static/src/js/reminder_topbar.js deleted file mode 100644 index b12a2558c..000000000 --- a/hr_reminder/static/src/js/reminder_topbar.js +++ /dev/null @@ -1,84 +0,0 @@ -odoo.define('hr_reminder.reminder_topbar', function (require) { -"use strict"; - -var core = require('web.core'); -var SystrayMenu = require('web.SystrayMenu'); -var Widget = require('web.Widget'); -var QWeb = core.qweb; -var ajax = require('web.ajax'); - -var reminder_menu = Widget.extend({ - template:'reminder_menu', - - events: { - "click .dropdown-toggle": "on_click_reminder", - "click .detail-client-address-country": "reminder_active", - }, - - - on_click_reminder: function (event) { - var self = this - ajax.jsonRpc("/hr_reminder/all_reminder", 'call',{} - ).then(function(all_reminder){ - self.all_reminder = all_reminder - self.$('.o_mail_navbar_dropdown_top').html(QWeb.render('reminder_menu',{ - values: self.all_reminder - })); - }) - }, - - - reminder_active: function(){ - var self = this; - var value =$("#reminder_select").val(); - ajax.jsonRpc("/hr_reminder/reminder_active", 'call',{'reminder_name':value} - ).then(function(reminder){ - self.reminder = reminder - for (var i=0;i<1;i++){ - var model = self.reminder[i] - var date = self.reminder[i+1] - console.log("DDDDDDDDDDDDDDDDDDDDDDDDDDDDDd",date,new Date()) - if (self.reminder[i+2] == 'today'){ - - return self.do_action({ - type: 'ir.actions.act_window', - res_model: model, - view_mode: 'list', - view_type: 'list', - domain: [[date, '=', new Date()]], - views: [[false, 'list']], - target: 'new',}) - } - - else if (self.reminder[i+2] == 'set_date'){ - return self.do_action({ - type: 'ir.actions.act_window', - res_model: model, - view_mode: 'list', - view_type: 'list', - domain: [[date, '=', self.reminder[i+3]]], - views: [[false, 'list']], - target: 'new', - }) - } - - else if (self.reminder[i+2] == 'set_period'){ - return self.do_action({ - type: 'ir.actions.act_window', - res_model: model, - view_mode: 'list', - view_type: 'list', - domain: [[date, '<', self.reminder[i+5]],[date, '>', self.reminder[i+4]]], - views: [[false, 'list']], - target: 'new', - }) - } - - } - - }); - }, -}); - -SystrayMenu.Items.push(reminder_menu); -}); diff --git a/hr_reminder/static/src/xml/reminder_topbar.xml b/hr_reminder/static/src/xml/reminder_topbar.xml deleted file mode 100644 index b61c42ab9..000000000 --- a/hr_reminder/static/src/xml/reminder_topbar.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - -
  • - - - -
  • -
    -
    \ No newline at end of file diff --git a/hr_reminder/views/hr_reminder_view.xml b/hr_reminder/views/hr_reminder_view.xml deleted file mode 100644 index d6cd5b15e..000000000 --- a/hr_reminder/views/hr_reminder_view.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Reminder scheduler - - code - model.reminder_scheduler() - - 1 - minutes - -1 - - - - - - - hr.reminder.form.view - hr.reminder - -
    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - - - hr.reminder.tree.view - hr.reminder - - - - - - - - - - - - Reminders - hr.reminder - tree,form - -

    - Click here to create new reminder. -

    -
    -
    - - - -
    -
    \ No newline at end of file diff --git a/hr_reminder/views/reminder_template.xml b/hr_reminder/views/reminder_template.xml deleted file mode 100644 index e7cf0e20a..000000000 --- a/hr_reminder/views/reminder_template.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/hr_resignation/README.rst b/hr_resignation/README.rst deleted file mode 100644 index 156dc316f..000000000 --- a/hr_resignation/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -OHRMS Employee Resignation v11 -============================== - -Employee Resignation Process. - -Depends -======= -[hr_employee_updation] addon Open HRMS -[mail] addon Odoo - -Tech -==== -* [Python] - Models -* [XML] - Odoo views - -Installation -============ -- www.odoo.com/documentation/11.0/setup/install.html -- Install our custom addon - - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- - -Developer: Niyas Raphy @ cybrosys, niyas@cybrosys.in - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_resignation/__init__.py b/hr_resignation/__init__.py deleted file mode 100644 index a0fdc10fe..000000000 --- a/hr_resignation/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from . import models diff --git a/hr_resignation/__manifest__.py b/hr_resignation/__manifest__.py deleted file mode 100644 index 9ad8a9da0..000000000 --- a/hr_resignation/__manifest__.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Niyas Raphy() -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': 'Open HRMS Resignation', - 'version': '11.0.1.0.0', - 'summary': 'Handle the resignation process of the employee', - 'author': 'Cybrosys Techno solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': 'https://www.openhrms.com', - 'depends': ['hr_employee_updation', 'mail'], - 'category': 'Human Resources', - 'maintainer': 'Cybrosys Techno Solutions', - 'demo': [], - 'data': [ - 'views/resignation_view.xml', - 'views/approved_resignation.xml', - 'views/resignation_sequence.xml', - 'security/security.xml', - 'security/ir.model.access.csv', - ], - 'installable': True, - 'application': False, - 'auto_install': False, - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', -} - diff --git a/hr_resignation/docs/RELEASE_NOTES.md b/hr_resignation/docs/RELEASE_NOTES.md deleted file mode 100644 index 1adf02753..000000000 --- a/hr_resignation/docs/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_resignation - -#### 07.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial Commit diff --git a/hr_resignation/models/__init__.py b/hr_resignation/models/__init__.py deleted file mode 100644 index fb9ec22ad..000000000 --- a/hr_resignation/models/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from . import hr_resignation diff --git a/hr_resignation/models/hr_resignation.py b/hr_resignation/models/hr_resignation.py deleted file mode 100644 index fe55dc80e..000000000 --- a/hr_resignation/models/hr_resignation.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from datetime import datetime -from odoo import models, fields, api, _ -from odoo.exceptions import ValidationError -date_format = "%Y-%m-%d" - - -class HrResignation(models.Model): - _name = 'hr.resignation' - _inherit = 'mail.thread' - _rec_name = 'employee_id' - - def _get_employee_id(self): - # assigning the related employee of the logged in user - employee_rec = self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1) - return employee_rec.id - - name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, index=True, - default=lambda self: _('New')) - employee_id = fields.Many2one('hr.employee', string="Employee", default=_get_employee_id, - help='Name of the employee for whom the request is creating') - department_id = fields.Many2one('hr.department', string="Department", related='employee_id.department_id', - help='Department of the employee') - joined_date = fields.Date(string="Join Date", required=True, - help='Joining date of the employee') - expected_revealing_date = fields.Date(string="Revealing Date", required=True, - help='Date on which he is revealing from the company') - resign_confirm_date = fields.Date(string="Resign confirm date", help='Date on which the request is confirmed') - approved_revealing_date = fields.Date(string="Approved Date", help='The date approved for the revealing') - reason = fields.Text(string="Reason", help='Specify reason for leaving the company') - notice_period = fields.Char(string="Notice Period", compute='_notice_period') - state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirm'), ('approved', 'Approved'), ('cancel', 'Cancel')], - string='Status', default='draft') - - @api.onchange('employee_id') - def set_join_date(self): - self.joined_date = self.employee_id.joining_date if self.employee_id.joining_date else '' - - @api.model - def create(self, vals): - # assigning the sequence for the record - if vals.get('name', _('New')) == _('New'): - vals['name'] = self.env['ir.sequence'].next_by_code('hr.resignation') or _('New') - res = super(HrResignation, self).create(vals) - return res - - @api.constrains('employee_id') - def check_employee(self): - # Checking whether the user is creating leave request of his/her own - for rec in self: - if not self.env.user.has_group('hr.group_hr_user'): - if rec.employee_id.user_id.id and rec.employee_id.user_id.id != self.env.uid: - raise ValidationError(_('You cannot create request for other employees')) - - @api.onchange('employee_id') - @api.depends('employee_id') - def check_request_existence(self): - # Check whether any resignation request already exists - for rec in self: - if rec.employee_id: - resignation_request = self.env['hr.resignation'].search([('employee_id', '=', rec.employee_id.id), - ('state', 'in', ['confirm', 'approved'])]) - if resignation_request: - raise ValidationError(_('There is a resignation request in confirmed or' - ' approved state for this employee')) - - @api.multi - def _notice_period(self): - # calculating the notice period for the employee - for rec in self: - if rec.approved_revealing_date and rec.resign_confirm_date: - approved_date = datetime.strptime(rec.approved_revealing_date, date_format) - confirmed_date = datetime.strptime(rec.resign_confirm_date, date_format) - notice_period = approved_date - confirmed_date - rec.notice_period = notice_period.days - - @api.constrains('joined_date', 'expected_revealing_date') - def _check_dates(self): - # validating the entered dates - for rec in self: - resignation_request = self.env['hr.resignation'].search([('employee_id', '=', rec.employee_id.id), - ('state', 'in', ['confirm', 'approved'])]) - if resignation_request: - raise ValidationError(_('There is a resignation request in confirmed or' - ' approved state for this employee')) - if rec.joined_date >= rec.expected_revealing_date: - raise ValidationError(_('Revealing date must be anterior to joining date')) - - @api.multi - def confirm_resignation(self): - for rec in self: - rec.state = 'confirm' - rec.resign_confirm_date = datetime.now() - - @api.multi - def cancel_resignation(self): - for rec in self: - rec.state = 'cancel' - - @api.multi - def reject_resignation(self): - for rec in self: - rec.state = 'rejected' - - @api.multi - def approve_resignation(self): - for rec in self: - if not rec.approved_revealing_date: - raise ValidationError(_('Enter Approved Revealing Date')) - if rec.approved_revealing_date and rec.resign_confirm_date: - if rec.approved_revealing_date <= rec.resign_confirm_date: - raise ValidationError(_('Approved revealing date must be anterior to confirmed date')) - rec.state = 'approved' - - - - diff --git a/hr_resignation/security/ir.model.access.csv b/hr_resignation/security/ir.model.access.csv deleted file mode 100644 index 62723a73b..000000000 --- a/hr_resignation/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -view_hr_resignation,view.hr.resignation,hr_resignation.model_hr_resignation,base.group_user,1,1,1,0 -view_hr_employee,view.hr.employee,hr.model_hr_employee,base.group_user,1,1,1,0 diff --git a/hr_resignation/security/security.xml b/hr_resignation/security/security.xml deleted file mode 100644 index 25074e4c0..000000000 --- a/hr_resignation/security/security.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Employee Resignation - - ['|',('employee_id.user_id','=',user.id),('employee_id.user_id','=',False)] - - - - diff --git a/hr_resignation/static/description/HRMS-BUTTON.png b/hr_resignation/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_resignation/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_resignation/static/description/banner.jpg b/hr_resignation/static/description/banner.jpg deleted file mode 100644 index a41f52839..000000000 Binary files a/hr_resignation/static/description/banner.jpg and /dev/null differ diff --git a/hr_resignation/static/description/cybro-service.png b/hr_resignation/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_resignation/static/description/cybro-service.png and /dev/null differ diff --git a/hr_resignation/static/description/cybro_logo.png b/hr_resignation/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_resignation/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_resignation/static/description/hr_resignation.gif b/hr_resignation/static/description/hr_resignation.gif deleted file mode 100644 index ef8e29c07..000000000 Binary files a/hr_resignation/static/description/hr_resignation.gif and /dev/null differ diff --git a/hr_resignation/static/description/icon.png b/hr_resignation/static/description/icon.png deleted file mode 100644 index 94d726147..000000000 Binary files a/hr_resignation/static/description/icon.png and /dev/null differ diff --git a/hr_resignation/static/description/index.html b/hr_resignation/static/description/index.html deleted file mode 100644 index 57887d6fc..000000000 --- a/hr_resignation/static/description/index.html +++ /dev/null @@ -1,103 +0,0 @@ -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

    -
    -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    -
    -

    Employee Resignation

    -

    Easily create, manage, and track employee resignations.

    -

    Cybrosys Technologies

    -
    -
    -

    Major Features:

    -
      -
    •   Employee will create his/her resignation request
    • -
    •   Higher level officers can approve or reject the request
    • -
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    - Employee Resignation is a component of Open HRMS suit. This module manages employee resignation process. - Employee can fill and send resignation request from their portal and higher level officers can take - appropriate actions on it. -

    -
    -
    -
    - -
    -
    -
    -

    Working

    -
    -
    - -
    -
    -
    -
    -
    - - -
    -
    -

    Our Odoo Services

    -
    -
    -
    - - - -
    -
    -
    - -
    -

    Need Any Help?

    - -
    - - - diff --git a/hr_resignation/views/approved_resignation.xml b/hr_resignation/views/approved_resignation.xml deleted file mode 100644 index b53497528..000000000 --- a/hr_resignation/views/approved_resignation.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Approved Resignation - hr.resignation - form - tree,form - [('state', '=', 'approved')] - -

    Approved Resignation -

    -
    -
    - - -
    -
    - - diff --git a/hr_resignation/views/resignation_sequence.xml b/hr_resignation/views/resignation_sequence.xml deleted file mode 100644 index 65ee9ee4b..000000000 --- a/hr_resignation/views/resignation_sequence.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - Open HRMS Resignation - hr.resignation - RES - 3 - - - - - diff --git a/hr_resignation/views/resignation_view.xml b/hr_resignation/views/resignation_view.xml deleted file mode 100644 index 745698414..000000000 --- a/hr_resignation/views/resignation_view.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - hr.resignation.tree - hr.resignation - - - - - - - - - - - - - - hr.resignation.form - hr.resignation - - -
    -
    -
    - -
    -

    - -

    -
    - - - - - - - - - - - - - - -
    -
    - - -
    -
    -
    -
    - - Employee Resignation - hr.resignation - form - tree,form - [('state', 'in', ('draft', 'confirm'))] - -

    Employee Resignation Form -

    -
    -
    - - -
    -
    - - diff --git a/hr_reward_warning/README.md b/hr_reward_warning/README.md deleted file mode 100644 index 6fc40f0f2..000000000 --- a/hr_reward_warning/README.md +++ /dev/null @@ -1,17 +0,0 @@ -OH Reward/Warning ---------------------- -Supporting Addon for Open HRMS, Managing Official Announcements - -Connect with experts --------------------- - -If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. - -Contacts --------- -info - info@cybrosys.com -Jesni Banu - jesni@cybrosys.in - -Website: -https://www.openhrms.com -https://www.cybrosys.com diff --git a/hr_reward_warning/__init__.py b/hr_reward_warning/__init__.py deleted file mode 100644 index fa5f521c3..000000000 --- a/hr_reward_warning/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import models - - - diff --git a/hr_reward_warning/__manifest__.py b/hr_reward_warning/__manifest__.py deleted file mode 100644 index f64f67965..000000000 --- a/hr_reward_warning/__manifest__.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': 'Open HRMS Official Announcements', - 'version': '11.0.1.0.0', - 'summary': """Managing Official Announcements""", - 'description': 'This module helps you to manage hr official announcements', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr_payroll'], - 'data': [ - 'security/ir.model.access.csv', - 'security/reward_security.xml', - 'views/hr_announcement_view.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_reward_warning/doc/RELEASE_NOTES.md b/hr_reward_warning/doc/RELEASE_NOTES.md deleted file mode 100644 index 17bc451cf..000000000 --- a/hr_reward_warning/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 21.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/hr_reward_warning/models/__init__.py b/hr_reward_warning/models/__init__.py deleted file mode 100644 index 7d8916fd0..000000000 --- a/hr_reward_warning/models/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import hr_warning -from . import hr_employee - - diff --git a/hr_reward_warning/models/hr_employee.py b/hr_reward_warning/models/hr_employee.py deleted file mode 100644 index 44730e53c..000000000 --- a/hr_reward_warning/models/hr_employee.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo import models, fields, api, _ - - -class HrAnnouncements(models.Model): - _inherit = 'hr.employee' - - @api.multi - def _announcement_count(self): - for obj in self: - announcement_ids = self.env['hr.announcement'].sudo().search([('is_announcement', '=', True), - ('state', 'in', ('approved', 'done'))]) - obj.announcement_count = len(announcement_ids) - - @api.multi - def announcement_view(self): - for obj in self: - ann_obj = self.env['hr.announcement'].sudo().search([('is_announcement', '=', True), - ('state', 'in', ('approved', 'done'))]) - ann_ids = [] - for each in ann_obj: - ann_ids.append(each.id) - view_id = self.env.ref('hr_reward_warning.view_hr_announcement_form').id - if ann_ids: - if len(ann_ids) > 1: - value = { - 'domain': str([('id', 'in', ann_ids)]), - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'hr.announcement', - 'view_id': False, - 'type': 'ir.actions.act_window', - 'name': _('Announcements'), - 'res_id': ann_ids - } - else: - value = { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'hr.announcement', - 'view_id': view_id, - 'type': 'ir.actions.act_window', - 'name': _('Announcements'), - 'res_id': ann_ids and ann_ids[0] - } - return value - - announcement_count = fields.Integer(compute='_announcement_count', string='# Announcements') \ No newline at end of file diff --git a/hr_reward_warning/models/hr_warning.py b/hr_reward_warning/models/hr_warning.py deleted file mode 100644 index 3a8246e0f..000000000 --- a/hr_reward_warning/models/hr_warning.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Jesni Banu () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from datetime import datetime -from odoo import models, fields, api, _ - - -class HrAnnouncementTable(models.Model): - _name = 'hr.announcement' - _description = 'HR Announcement' - _inherit = ['mail.thread', 'mail.activity.mixin'] - - name = fields.Char(string='Code No:') - announcement_reason = fields.Text(string='Title', states={'draft': [('readonly', False)]}, required=True, readonly=True) - state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'), - ('approved', 'Approved'), - ('done', 'Done'), ('rejected', 'Refused')], - string='Status', default='draft', - track_visibility='always') - requested_date = fields.Date(string='Requested Date', default=datetime.now().strftime('%Y-%m-%d')) - attachment_id = fields.Many2many('ir.attachment', 'doc_warning_rel', 'doc_id', 'attach_id4', - string="Attachment", help='You can attach the copy of your Letter') - company_id = fields.Many2one('res.company', string='Company', - default=lambda self: self.env.user.company_id, readonly=True,) - is_announcement = fields.Boolean(string='Is general Announcement?') - announcement = fields.Html(string='Letter', states={'draft': [('readonly', False)]}, readonly=True) - - @api.multi - def reject(self): - self.state = 'rejected' - - @api.multi - def approve(self): - self.state = 'approved' - - @api.multi - def set_to_done(self): - self.state = 'done' - - @api.multi - def sent(self): - self.state = 'to_approve' - - @api.model - def create(self, vals): - if vals.get('is_announcement'): - vals['name'] = self.env['ir.sequence'].next_by_code('hr.announcement') - return super(HrAnnouncementTable, self).create(vals) diff --git a/hr_reward_warning/security/ir.model.access.csv b/hr_reward_warning/security/ir.model.access.csv deleted file mode 100644 index 49d676c97..000000000 --- a/hr_reward_warning/security/ir.model.access.csv +++ /dev/null @@ -1,4 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_employee_reward_admin","hr.employee.reward","model_hr_announcement","hr.group_hr_manager",1,1,1,1 -"access_hr_employee_reward_user","hr.employee.reward.user","model_hr_announcement","hr.group_hr_user",1,1,1,1 -"access_hr_employee_reward_employee","hr.employee.reward.employee","model_hr_announcement","base.group_user",1,0,0,0 diff --git a/hr_reward_warning/security/reward_security.xml b/hr_reward_warning/security/reward_security.xml deleted file mode 100644 index c8f6db1f4..000000000 --- a/hr_reward_warning/security/reward_security.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - Announcement Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - diff --git a/hr_reward_warning/static/description/HRMS-BUTTON.png b/hr_reward_warning/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_reward_warning/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_reward_warning/static/description/banner.jpg b/hr_reward_warning/static/description/banner.jpg deleted file mode 100644 index 61924dabc..000000000 Binary files a/hr_reward_warning/static/description/banner.jpg and /dev/null differ diff --git a/hr_reward_warning/static/description/cybro-service.png b/hr_reward_warning/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_reward_warning/static/description/cybro-service.png and /dev/null differ diff --git a/hr_reward_warning/static/description/cybro_logo.png b/hr_reward_warning/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_reward_warning/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_reward_warning/static/description/hr_reward.png b/hr_reward_warning/static/description/hr_reward.png deleted file mode 100644 index 184ee961e..000000000 Binary files a/hr_reward_warning/static/description/hr_reward.png and /dev/null differ diff --git a/hr_reward_warning/static/description/icon.png b/hr_reward_warning/static/description/icon.png deleted file mode 100644 index 81e5258c8..000000000 Binary files a/hr_reward_warning/static/description/icon.png and /dev/null differ diff --git a/hr_reward_warning/static/description/index.html b/hr_reward_warning/static/description/index.html deleted file mode 100644 index 200f408da..000000000 --- a/hr_reward_warning/static/description/index.html +++ /dev/null @@ -1,87 +0,0 @@ -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

    -
    -
    - -
    -
    -
    -
    - - - - -
    -
    -
    -
    - -
    -
    -

    Open HRMS Official Announcements

    -

    Manages Official Announcements

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Managing Official Announcements.
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    - This module helps you to manage official announcements. -

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -

    Our Odoo Services

    -
    -
    -
    - - - -
    -
    -
    - -
    -

    Need Any Help?

    - -
    - diff --git a/hr_reward_warning/views/hr_announcement_view.xml b/hr_reward_warning/views/hr_announcement_view.xml deleted file mode 100644 index cce5e3a6d..000000000 --- a/hr_reward_warning/views/hr_announcement_view.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - Announcement - hr.announcement - GA - - - - - hr.announcement.form - hr.announcement - -
    -
    -
    - - -
    - - -
    -
    -
    -
    - - - hr.announcement.tree - hr.announcement - - - - - - - - - - - hr.announcement.search - hr.announcement - - - - - - - - - - - - - - - - - - Announcements - hr.announcement - form - tree,form - - -

    - Click to Create a New Record. -

    -
    -
    - - - - - - hr.employee.form.inherit.view - hr.employee - - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/hr_vacation_mngmt/__init__.py b/hr_vacation_mngmt/__init__.py deleted file mode 100644 index c74433564..000000000 --- a/hr_vacation_mngmt/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import models -from . import wizard diff --git a/hr_vacation_mngmt/__manifest__.py b/hr_vacation_mngmt/__manifest__.py deleted file mode 100644 index c14b4d2d3..000000000 --- a/hr_vacation_mngmt/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open Hrms Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': "Open HRMS Vacation Management", - 'version': '11.0.1.0.0', - 'summary': """Manage Employee Vacation""", - 'description': """HR Vacation management""", - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': 'https://www.openhrms.com', - 'category': 'Generic Modules/Human Resources', - 'depends': ['hr_leave_request_aliasing','project', 'hr_payroll', 'account'], - 'data': [ - 'security/hr_vacation_security.xml', - 'security/ir.model.access.csv', - 'data/hr_payslip_data.xml', - 'views/hr_reminder.xml', - 'data/hr_vacation_data.xml', - 'wizard/reassign_task.xml', - 'views/hr_employee_ticket.xml', - 'views/hr_vacation.xml', - 'views/hr_payslip.xml', - ], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_vacation_mngmt/data/hr_payslip_data.xml b/hr_vacation_mngmt/data/hr_payslip_data.xml deleted file mode 100644 index 68d534755..000000000 --- a/hr_vacation_mngmt/data/hr_payslip_data.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - Leave Salary - - - - - - Leave Salary - LS - - - - none - code - result = categories.BASIC - - - - Leave Salary - LS - - - - none - code - result = categories.BASIC + categories.ALW - - - \ No newline at end of file diff --git a/hr_vacation_mngmt/data/hr_vacation_data.xml b/hr_vacation_mngmt/data/hr_vacation_data.xml deleted file mode 100644 index b0a618611..000000000 --- a/hr_vacation_mngmt/data/hr_vacation_data.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Flight ticket status update - - code - model.run_update_ticket_status() - 1 - days - -1 - - - - - HR Leave Reminder - - code - model.send_leave_reminder() - 1 - days - -1 - - - - - Airlines - True - - - \ No newline at end of file diff --git a/hr_vacation_mngmt/doc/RELEASE_NOTES.md b/hr_vacation_mngmt/doc/RELEASE_NOTES.md deleted file mode 100644 index 354e022df..000000000 --- a/hr_vacation_mngmt/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 25.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_vacation_mngmt/doc/RELEASE_NOTES.md~ b/hr_vacation_mngmt/doc/RELEASE_NOTES.md~ deleted file mode 100644 index 1a18ce542..000000000 --- a/hr_vacation_mngmt/doc/RELEASE_NOTES.md~ +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_vacation_mngmt/models/__init__.py b/hr_vacation_mngmt/models/__init__.py deleted file mode 100644 index 827a12580..000000000 --- a/hr_vacation_mngmt/models/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import hr_vacation -from . import hr_payslip -from . import hr_employee_ticket diff --git a/hr_vacation_mngmt/models/hr_employee_ticket.py b/hr_vacation_mngmt/models/hr_employee_ticket.py deleted file mode 100644 index 46df3c75b..000000000 --- a/hr_vacation_mngmt/models/hr_employee_ticket.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- - -from datetime import datetime -from odoo import models, fields, api, _ -from odoo.exceptions import UserError, ValidationError - - -class HrFlightTicket(models.Model): - _name = 'hr.flight.ticket' - - name = fields.Char() - employee_id = fields.Many2one('hr.employee', string='Employee', required=True) - ticket_type = fields.Selection([('one', 'One Way'), ('round', 'Round Trip')], string='Ticket Type', default='round') - depart_from = fields.Char(string='Departure', required=True) - destination = fields.Char(string='Destination', required=True) - date_start = fields.Date(string='Start Date', required=True) - date_return = fields.Date(string='Return Date') - ticket_class = fields.Selection([('economy', 'Economy'), - ('premium_economy', 'Premium Economy'), - ('business', 'Business'), - ('first_class', 'First Class')], string='Class') - ticket_fare = fields.Float(string='Ticket Fare') - flight_details = fields.Text(string='Flight Details') - return_flight_details = fields.Text(string='Return Flight Details') - state = fields.Selection([('booked', 'Booked'), ('confirmed', 'Confirmed'), ('started', 'Started'), - ('completed', 'Completed'), ('canceled', 'Canceled')], string='Status', default='booked') - invoice_id = fields.Many2one('account.invoice', string='Invoice') - leave_id = fields.Many2one('hr.holidays', string='Leave') - company_id = fields.Many2one('res.company', 'Company', default=lambda self: self.env.user.company_id) - - @api.multi - def name_get(self): - res = [] - for ticket in self: - res.append((ticket.id, _("Flight ticket for %s on %s to %s") % ( - ticket.employee_id.name, ticket.date_start, ticket.destination))) - return res - - @api.constrains('date_start', 'date_return') - def check_valid_date(self): - if self.filtered(lambda c: c.date_return and c.date_start > c.date_return): - raise ValidationError(_('Flight travelling start date must be less than flight return date.')) - - def book_ticket(self): - return {'type': 'ir.actions.act_window_close'} - - def confirm_ticket(self): - if self.ticket_fare <= 0: - raise UserError(_('Please add ticket fare.')) - inv_obj = self.env['account.invoice'].sudo() - expense_account = self.env['ir.config_parameter'].sudo().get_param('travel_expense_account') - if not expense_account: - raise UserError(_('Please select expense account for the flight tickets.')) - domain = [ - ('type', '=', 'purchase'), - ('company_id', '=', self.company_id.id), - ] - journal_id = self.env['account.journal'].search(domain, limit=1) - partner = self.env.ref('hr_vacation_mngmt.air_lines_partner') - if not partner.property_payment_term_id: - date_due = fields.Date.context_today(self) - else: - pterm = partner.property_payment_term_id - pterm_list = \ - pterm.with_context(currency_id=self.env.user.company_id.id).compute( - value=1, date_ref=fields.Date.context_today(self))[0] - date_due = max(line[0] for line in pterm_list) - inv_data = { - 'name': '', - 'origin': 'Flight Ticket', - 'type': 'in_invoice', - 'journal_id': journal_id.id, - 'payment_term_id': partner.property_payment_term_id.id, - 'date_due': date_due, - 'reference': False, - 'partner_id': partner.id, - 'account_id': partner.property_account_payable_id.id, - 'invoice_line_ids': [(0, 0, { - 'name': 'Flight Ticket', - 'price_unit': self.ticket_fare, - 'quantity': 1.0, - 'account_id': expense_account, - })], - } - inv_id = inv_obj.create(inv_data) - inv_id.action_invoice_open() - self.write({'state': 'confirmed', 'invoice_id': inv_id.id}) - - def cancel_ticket(self): - if self.state == 'booked': - self.write({'state': 'canceled'}) - elif self.state == 'confirmed': - if self.invoice_id and self.invoice_id.state == 'paid': - self.write({'state': 'canceled'}) - if self.invoice_id and self.invoice_id.state == 'open': - self.invoice_id.action_invoice_cancel() - self.write({'state': 'canceled'}) - - @api.model - def run_update_ticket_status(self): - run_out_tickets = self.search([('state', 'in', ['confirmed', 'started']), - ('date_return', '<=', datetime.now())]) - confirmed_tickets = self.search([('state', '=', 'confirmed'), ('date_start', '<=', datetime.now()), - ('date_return', '>', datetime.now())]) - for ticket in run_out_tickets: - ticket.write({'state': 'completed'}) - for ticket in confirmed_tickets: - ticket.write({'state': 'started'}) - - @api.multi - def action_view_invoice(self): - return { - 'name': _('Flight Ticket Invoice'), - 'view_mode': 'form', - 'view_id': self.env.ref('account.invoice_supplier_form').id, - 'res_model': 'account.invoice', - 'context': "{'type':'in_invoice'}", - 'type': 'ir.actions.act_window', - 'res_id': self.invoice_id.id, - } diff --git a/hr_vacation_mngmt/models/hr_payslip.py b/hr_vacation_mngmt/models/hr_payslip.py deleted file mode 100644 index 7c6fb6a32..000000000 --- a/hr_vacation_mngmt/models/hr_payslip.py +++ /dev/null @@ -1,183 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api, _ - - -class HrPayslip(models.Model): - _inherit = 'hr.payslip' - - leave_salary = fields.Boolean(string='Leave Salary') - - @api.model - def _get_payslip_lines(self, contract_ids, payslip_id): - def _sum_salary_rule_category(localdict, category, amount): - if category.parent_id: - localdict = _sum_salary_rule_category(localdict, category.parent_id, amount) - localdict['categories'].dict[category.code] = category.code in localdict['categories'].dict and localdict['categories'].dict[category.code] + amount or amount - return localdict - - class BrowsableObject(object): - def __init__(self, employee_id, dict, env): - self.employee_id = employee_id - self.dict = dict - self.env = env - - def __getattr__(self, attr): - return attr in self.dict and self.dict.__getitem__(attr) or 0.0 - - class InputLine(BrowsableObject): - """a class that will be used into the python code, mainly for usability purposes""" - def sum(self, code, from_date, to_date=None): - if to_date is None: - to_date = fields.Date.today() - self.env.cr.execute(""" - SELECT sum(amount) as sum - FROM hr_payslip as hp, hr_payslip_input as pi - WHERE hp.employee_id = %s AND hp.state = 'done' - AND hp.date_from >= %s AND hp.date_to <= %s AND hp.id = pi.payslip_id AND pi.code = %s""", - (self.employee_id, from_date, to_date, code)) - return self.env.cr.fetchone()[0] or 0.0 - - class WorkedDays(BrowsableObject): - """a class that will be used into the python code, mainly for usability purposes""" - def _sum(self, code, from_date, to_date=None): - if to_date is None: - to_date = fields.Date.today() - self.env.cr.execute(""" - SELECT sum(number_of_days) as number_of_days, sum(number_of_hours) as number_of_hours - FROM hr_payslip as hp, hr_payslip_worked_days as pi - WHERE hp.employee_id = %s AND hp.state = 'done' - AND hp.date_from >= %s AND hp.date_to <= %s AND hp.id = pi.payslip_id AND pi.code = %s""", - (self.employee_id, from_date, to_date, code)) - return self.env.cr.fetchone() - - def sum(self, code, from_date, to_date=None): - res = self._sum(code, from_date, to_date) - return res and res[0] or 0.0 - - def sum_hours(self, code, from_date, to_date=None): - res = self._sum(code, from_date, to_date) - return res and res[1] or 0.0 - - class Payslips(BrowsableObject): - """a class that will be used into the python code, mainly for usability purposes""" - - def sum(self, code, from_date, to_date=None): - if to_date is None: - to_date = fields.Date.today() - self.env.cr.execute("""SELECT sum(case when hp.credit_note = False then (pl.total) else (-pl.total) end) - FROM hr_payslip as hp, hr_payslip_line as pl - WHERE hp.employee_id = %s AND hp.state = 'done' - AND hp.date_from >= %s AND hp.date_to <= %s AND hp.id = pl.slip_id AND pl.code = %s""", - (self.employee_id, from_date, to_date, code)) - res = self.env.cr.fetchone() - return res and res[0] or 0.0 - - #we keep a dict with the result because a value can be overwritten by another rule with the same code - result_dict = {} - rules_dict = {} - worked_days_dict = {} - inputs_dict = {} - blacklist = [] - payslip = self.env['hr.payslip'].browse(payslip_id) - for worked_days_line in payslip.worked_days_line_ids: - worked_days_dict[worked_days_line.code] = worked_days_line - for input_line in payslip.input_line_ids: - inputs_dict[input_line.code] = input_line - - categories = BrowsableObject(payslip.employee_id.id, {}, self.env) - inputs = InputLine(payslip.employee_id.id, inputs_dict, self.env) - worked_days = WorkedDays(payslip.employee_id.id, worked_days_dict, self.env) - payslips = Payslips(payslip.employee_id.id, payslip, self.env) - rules = BrowsableObject(payslip.employee_id.id, rules_dict, self.env) - - baselocaldict = {'categories': categories, 'rules': rules, 'payslip': payslips, 'worked_days': worked_days, - 'inputs': inputs} - # get the ids of the structures on the contracts and their parent id as well - contracts = self.env['hr.contract'].browse(contract_ids) - structure_ids = contracts.get_all_structures() - # get the rules of the structure and thier children - rule_ids = self.env['hr.payroll.structure'].browse(structure_ids).get_all_rules() - # leave salary computation - if payslip.leave_salary: - leave_sal_basic = self.env.ref('hr_vacation_mngmt.hr_salary_rule_leave_salary_basic') - leave_sal_gross = self.env.ref('hr_vacation_mngmt.hr_salary_rule_leave_salary_gross') - default_leave_salary = self.env['ir.config_parameter'].sudo().get_param('default_leave_salary') - if default_leave_salary == '0': - leave_salary = leave_sal_basic - elif default_leave_salary == '1': - leave_salary = leave_sal_gross - else: - leave_salary = leave_sal_basic - rule_ids.append((leave_salary.id, leave_salary.sequence)) - # run the rules by sequence - sorted_rule_ids = [id for id, sequence in sorted(rule_ids, key=lambda x:x[1])] - sorted_rules = self.env['hr.salary.rule'].browse(sorted_rule_ids) - - for contract in contracts: - employee = contract.employee_id - localdict = dict(baselocaldict, employee=employee, contract=contract) - for rule in sorted_rules: - key = rule.code + '-' + str(contract.id) - localdict['result'] = None - localdict['result_qty'] = 1.0 - localdict['result_rate'] = 100 - #check if the rule can be applied - if rule._satisfy_condition(localdict) and rule.id not in blacklist: - #compute the amount of the rule - amount, qty, rate = rule._compute_rule(localdict) - #check if there is already a rule computed with that code - previous_amount = rule.code in localdict and localdict[rule.code] or 0.0 - #set/overwrite the amount computed for this rule in the localdict - tot_rule = amount * qty * rate / 100.0 - localdict[rule.code] = tot_rule - rules_dict[rule.code] = rule - #sum the amount for its salary category - localdict = _sum_salary_rule_category(localdict, rule.category_id, tot_rule - previous_amount) - #create/overwrite the rule in the temporary results - result_dict[key] = { - 'salary_rule_id': rule.id, - 'contract_id': contract.id, - 'name': rule.name, - 'code': rule.code, - 'category_id': rule.category_id.id, - 'sequence': rule.sequence, - 'appears_on_payslip': rule.appears_on_payslip, - 'condition_select': rule.condition_select, - 'condition_python': rule.condition_python, - 'condition_range': rule.condition_range, - 'condition_range_min': rule.condition_range_min, - 'condition_range_max': rule.condition_range_max, - 'amount_select': rule.amount_select, - 'amount_fix': rule.amount_fix, - 'amount_python_compute': rule.amount_python_compute, - 'amount_percentage': rule.amount_percentage, - 'amount_percentage_base': rule.amount_percentage_base, - 'register_id': rule.register_id.id, - 'amount': amount, - 'employee_id': contract.employee_id.id, - 'quantity': qty, - 'rate': rate, - } - else: - #blacklist this rule and its children - blacklist += [id for id, seq in rule._recursive_search_of_rules()] - - return list(result_dict.values()) - - -class HrPayrollConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' - - default_leave_salary = fields.Selection([('0', 'Basic'), ('1', 'Gross')], string='Leave Salary') - - def get_values(self): - res = super(HrPayrollConfigSettings, self).get_values() - res.update( - default_leave_salary=self.env['ir.config_parameter'].sudo().get_param('default_leave_salary') - ) - return res - - def set_values(self): - super(HrPayrollConfigSettings, self).set_values() - self.env['ir.config_parameter'].sudo().set_param('default_leave_salary', self.default_leave_salary) diff --git a/hr_vacation_mngmt/models/hr_vacation.py b/hr_vacation_mngmt/models/hr_vacation.py deleted file mode 100644 index 6175c0789..000000000 --- a/hr_vacation_mngmt/models/hr_vacation.py +++ /dev/null @@ -1,171 +0,0 @@ -# -*- coding: utf-8 -*- - -from datetime import datetime, timedelta, date -from odoo import models, fields, api, _ -from odoo.exceptions import UserError - - -class HrLeaveRequest(models.Model): - _inherit = 'hr.holidays' - - remaining_leaves = fields.Float(string='Remaining Legal Leaves', related='employee_id.remaining_leaves') - overlapping_leaves = fields.Many2many('hr.holidays', compute='get_overlapping_leaves', string='Overlapping Leaves') - pending_tasks = fields.One2many('pending.task', 'leave_id', string='Pending Tasks') - holiday_managers = fields.Many2many('res.users', compute='get_hr_holiday_managers') - flight_ticket = fields.One2many('hr.flight.ticket', 'leave_id', string='Flight Ticket') - - @api.one - def get_overlapping_leaves(self): - if self.type == 'remove' and self.date_from and self.date_to: - overlap_leaves = [] - from_date = datetime.strptime(self.date_from, '%Y-%m-%d %H:%M:%S').date() - to_date = datetime.strptime(self.date_to, '%Y-%m-%d %H:%M:%S').date() - r = (to_date + timedelta(days=1) - from_date).days - leave_dates = [str(from_date + timedelta(days=i)) for i in range(r)] - leaves = self.env['hr.holidays'].search([('state', '=', 'validate'), ('type', '=', 'remove'), - ('department_id', '=', self.department_id.id)]) - other_leaves = leaves - self - for leave in other_leaves: - frm_dte = datetime.strptime(leave.date_from, '%Y-%m-%d %H:%M:%S').date() - to_dte = datetime.strptime(leave.date_to, '%Y-%m-%d %H:%M:%S').date() - r = (to_dte + timedelta(days=1) - frm_dte).days - leave_dtes = [str(frm_dte + timedelta(days=i)) for i in range(r)] - if set(leave_dtes).intersection(set(leave_dates)): - overlap_leaves.append(leave.id) - self.update({'overlapping_leaves': [(6, 0, overlap_leaves)]}) - - @api.multi - def action_approve(self): - # if double_validation: this method is the first approval approval - # if not double_validation: this method calls action_validate() below - if not self.env.user.has_group('hr_holidays.group_hr_holidays_user'): - raise UserError(_('Only an HR Officer or Manager can approve leave requests.')) - - manager = self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1) - for holiday in self: - if holiday.state != 'confirm': - raise UserError(_('Leave request must be confirmed ("To Approve") in order to approve it.')) - - if holiday.pending_tasks: - if holiday.user_id: - ctx = dict(self.env.context or {}) - ctx.update({ - 'default_leave_req_id': self.id, - }) - return { - 'name': _('Re-Assign Task'), - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'task.reassign', - 'target': 'new', - 'context': ctx, - } - else: - raise UserError(_('Please configure user for the employee %s') % (holiday.employee_id.name,)) - else: - if holiday.double_validation: - return holiday.write({'state': 'validate1', 'manager_id': manager.id if manager else False}) - else: - holiday.action_validate() - - def book_ticket(self): - if not self.env.user.has_group('hr_holidays.group_hr_holidays_user'): - raise UserError(_('Only an HR Officer or Manager can book flight tickets.')) - ctx = dict(self.env.context or {}) - ctx.update({ - 'default_employee_id': self.employee_id.id, - 'default_leave_id': self.id, - }) - return { - 'name': _('Book Flight Ticket'), - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form', - 'view_id': self.env.ref('hr_vacation_mngmt.view_hr_book_flight_ticket_form').id, - 'res_model': 'hr.flight.ticket', - 'target': 'new', - 'context': ctx, - } - - @api.one - def get_hr_holiday_managers(self): - self.holiday_managers = self.env.ref('hr_holidays.group_hr_holidays_manager').users - - def view_flight_ticket(self): - return { - 'name': _('Flight Ticket'), - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'hr.flight.ticket', - 'target': 'current', - 'res_id': self.flight_ticket[0].id, - } - - @api.model - def send_leave_reminder(self): - leave_request = self.env['hr.holidays'].search([('type', '=', 'remove'), ('state', '=', 'validate')]) - leave_reminder = self.env['ir.config_parameter'].sudo().get_param('leave_reminder') - reminder_day_before = int(self.env['ir.config_parameter'].sudo().get_param('reminder_day_before')) - mail_template = self.env.ref('hr_vacation_mngmt.email_template_hr_leave_reminder_mail') - holiday_managers = self.env.ref('hr_holidays.group_hr_holidays_manager').users - today = date.today() - if leave_reminder: - for request in leave_request: - if request.date_from: - from_date = datetime.strptime(request.date_from, '%Y-%m-%d %H:%M:%S').date() - if reminder_day_before == 0: - prev_reminder_day = request.date_from - else: - prev_reminder_day = from_date - timedelta(days=reminder_day_before) - if prev_reminder_day == today: - for manager in holiday_managers: - template = mail_template.sudo().with_context( - email_to=manager.email, - ) - template.send_mail(request.id, force_send=True) - - -class PendingTask(models.Model): - _name = 'pending.task' - - name = fields.Char(string='Task', required=True) - leave_id = fields.Many2one('hr.holidays', string='Leave Request') - dept_id = fields.Many2one('hr.department', string='Department', related='leave_id.department_id') - project_id = fields.Many2one('project.project', string='Project', required=True) - description = fields.Text(string='Description') - assigned_to = fields.Many2one('hr.employee', string='Assigned to', - domain="[('department_id', '=', dept_id)]") - unavailable_employee = fields.Many2many('hr.employee', string='Unavailable Employees', - compute='get_unavailable_employee') - - @api.one - def get_unavailable_employee(self): - unavail_emp = [] - for leave in self.leave_id.overlapping_leaves: - unavail_emp.append(leave.employee_id.id) - self.update({'unavailable_employee': unavail_emp}) - - -class HrVacationConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' - - leave_reminder = fields.Boolean(string='Leave Reminder Email', help="Send leave remainder emails to hr managers") - reminder_day_before = fields.Integer(string='Reminder Day Before') - default_expense_account = fields.Many2one('account.account', string='Travel Expense Account') - - def get_values(self): - res = super(HrVacationConfigSettings, self).get_values() - res.update( - leave_reminder=self.env['ir.config_parameter'].sudo().get_param('leave_reminder'), - reminder_day_before=int(self.env['ir.config_parameter'].sudo().get_param('reminder_day_before')), - default_expense_account=int(self.env['ir.config_parameter'].sudo().get_param('travel_expense_account')) - ) - return res - - def set_values(self): - super(HrVacationConfigSettings, self).set_values() - self.env['ir.config_parameter'].sudo().set_param('leave_reminder', self.leave_reminder) - self.env['ir.config_parameter'].sudo().set_param('reminder_day_before', self.reminder_day_before) - self.env['ir.config_parameter'].sudo().set_param('travel_expense_account', self.default_expense_account.id) diff --git a/hr_vacation_mngmt/security/hr_vacation_security.xml b/hr_vacation_mngmt/security/hr_vacation_security.xml deleted file mode 100644 index a7bba429f..000000000 --- a/hr_vacation_mngmt/security/hr_vacation_security.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Hr Flight Ticket Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - \ No newline at end of file diff --git a/hr_vacation_mngmt/security/ir.model.access.csv b/hr_vacation_mngmt/security/ir.model.access.csv deleted file mode 100644 index 74531a7eb..000000000 --- a/hr_vacation_mngmt/security/ir.model.access.csv +++ /dev/null @@ -1,8 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_hr_flight_ticket_user,hr.flight.ticket.user,model_hr_flight_ticket,hr_holidays.group_hr_holidays_user,1,1,1,1 -access_hr_flight_ticket_employee,hr.flight.ticket.employee,model_hr_flight_ticket,base.group_user,1,1,1,1 -access_pending_task_user,pending.task.user,model_pending_task,hr_holidays.group_hr_holidays_user,1,1,1,1 -access_pending_task_employee,pending.task.employee,model_pending_task,base.group_user,1,1,1,1 -access_account_invoice,account.invoice.hr_manager,account.model_account_invoice,hr_holidays.group_hr_holidays_manager,1,0,0,0 -access_account_invoice_tax,account.invoice.tax.hr_manager,account.model_account_invoice_tax,hr_holidays.group_hr_holidays_manager,1,0,0,0 -access_account_move_line,account.move.line.hr_manager,account.model_account_move_line,hr_holidays.group_hr_holidays_manager,1,0,0,0 \ No newline at end of file diff --git a/hr_vacation_mngmt/static/description/HRMS-BUTTON.png b/hr_vacation_mngmt/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_vacation_mngmt/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/banner.jpg b/hr_vacation_mngmt/static/description/banner.jpg deleted file mode 100644 index beb870c2b..000000000 Binary files a/hr_vacation_mngmt/static/description/banner.jpg and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/cybro-service.png b/hr_vacation_mngmt/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_vacation_mngmt/static/description/cybro-service.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/cybro_logo.png b/hr_vacation_mngmt/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_vacation_mngmt/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/icon.png b/hr_vacation_mngmt/static/description/icon.png deleted file mode 100644 index cf3082e3d..000000000 Binary files a/hr_vacation_mngmt/static/description/icon.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/index.html b/hr_vacation_mngmt/static/description/index.html deleted file mode 100644 index 8313a1a30..000000000 --- a/hr_vacation_mngmt/static/description/index.html +++ /dev/null @@ -1,216 +0,0 @@ -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

    -
    -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    -

    Open HRMS Vacation Management

    -

    Manage Employee Vacation

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Remaining legal leaves in leave request to approval.
    - Overlapping leaves.
    - Leave notification.
    - Leave salary.
    - Pending task update and re-assign task.
    - Flight ticket booking.
    -
    -
    -
    - -
    -
    -
    -
    -

    Overview

    -

    - This module extend Odoo default HR Holiday Management with extra features adaptable for managing employees vacation.. -

    -
    -
    -
    -
    - -
    -
    -
    -

    Remaining & Overlapping Leaves

    -

    - -
    -
    - -
    -
    -
    -

    Pending Tasks Update & Task Re-assign

    - -

    -
    -

    - Employees can able to update their pending tasks on leave request -

    - -
    - -
    -
    -
    - -
    -

    - On leave request approval it opens a wizard to re-assign tasks to available employees. -

    - -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -

    Flight Ticket Booking

    -

    -
    -

    - HR managers can able to book the flight ticket for the employee. -

    - -
    - -
    -
    -
    - - - -
    -

    - On confirming the flight ticket generate corresponding supplier invoice. -

    - -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -

    Leave Salary

    -

    - -
    -
    - -
    -
    -
    -

    Configurations

    -

    - - -
    -
    - -
    -
    -

    Our Odoo Services

    -
    -
    - -
    -
    - -
    -

    Need Any Help?

    - -
    - diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_01.png b/hr_vacation_mngmt/static/description/ohrms_vacation_01.png deleted file mode 100644 index e0c3b2065..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_01.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_02.png b/hr_vacation_mngmt/static/description/ohrms_vacation_02.png deleted file mode 100644 index f5fd72e74..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_02.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_03.png b/hr_vacation_mngmt/static/description/ohrms_vacation_03.png deleted file mode 100644 index b70b7530c..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_03.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_04.png b/hr_vacation_mngmt/static/description/ohrms_vacation_04.png deleted file mode 100644 index ee4a82ced..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_04.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_05.png b/hr_vacation_mngmt/static/description/ohrms_vacation_05.png deleted file mode 100644 index 74ece7ff9..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_05.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_06.png b/hr_vacation_mngmt/static/description/ohrms_vacation_06.png deleted file mode 100644 index 96660682b..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_06.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_07.png b/hr_vacation_mngmt/static/description/ohrms_vacation_07.png deleted file mode 100644 index b43c12347..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_07.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_08.png b/hr_vacation_mngmt/static/description/ohrms_vacation_08.png deleted file mode 100644 index c190c4950..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_08.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_09.png b/hr_vacation_mngmt/static/description/ohrms_vacation_09.png deleted file mode 100644 index 84221ab4b..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_09.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_10.png b/hr_vacation_mngmt/static/description/ohrms_vacation_10.png deleted file mode 100644 index 29079dca1..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_10.png and /dev/null differ diff --git a/hr_vacation_mngmt/static/description/ohrms_vacation_11.png b/hr_vacation_mngmt/static/description/ohrms_vacation_11.png deleted file mode 100644 index ad6004e62..000000000 Binary files a/hr_vacation_mngmt/static/description/ohrms_vacation_11.png and /dev/null differ diff --git a/hr_vacation_mngmt/views/hr_employee_ticket.xml b/hr_vacation_mngmt/views/hr_employee_ticket.xml deleted file mode 100644 index b845df735..000000000 --- a/hr_vacation_mngmt/views/hr_employee_ticket.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - hr.flight.ticket.form - hr.flight.ticket - - -
    -
    -
    - -
    - - -
    -
    -

    -
    - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - - - hr.flight.ticket.form - hr.flight.ticket - - - - - - - - - - - - - - hr.flight.ticket.form - hr.flight.ticket - - -
    -
    -

    -
    - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - - - Flight Tickets - hr.flight.ticket - tree,form - form - -

    - There is no previously booked flight ticket details available. -

    -
    -
    - - -
    -
    \ No newline at end of file diff --git a/hr_vacation_mngmt/views/hr_payslip.xml b/hr_vacation_mngmt/views/hr_payslip.xml deleted file mode 100644 index a29bc263e..000000000 --- a/hr_vacation_mngmt/views/hr_payslip.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - hr.payslip.form - hr.payslip - - - - - - - - - - Configure Payroll - res.config.settings - - - -

    Leaves

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/hr_vacation_mngmt/views/hr_reminder.xml b/hr_vacation_mngmt/views/hr_reminder.xml deleted file mode 100644 index eeb7614e2..000000000 --- a/hr_vacation_mngmt/views/hr_reminder.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Leave : Reminder - - - ${object.employee_id.company_id.email} - Reminder: ${object.display_name} - Hello ,

    -

    The employee ${object.employee_id.name} has taken ${object.no_of_days_temp} days leave starting from ${object.date_from} to ${object.date_to}.

    - -

    Kindly do the needful.

    - -

    Thank you!

    -]]>
    -
    -
    -
    \ No newline at end of file diff --git a/hr_vacation_mngmt/views/hr_vacation.xml b/hr_vacation_mngmt/views/hr_vacation.xml deleted file mode 100644 index 9e53fad57..000000000 --- a/hr_vacation_mngmt/views/hr_vacation.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Leave Request - hr.holidays - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - pending.task.form - pending.task - -
    - - - - - - - - - - - - - - - -
    -
    -
    - - - Configure Leave - res.config.settings - - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/hr_vacation_mngmt/wizard/__init__.py b/hr_vacation_mngmt/wizard/__init__.py deleted file mode 100644 index 14c06bcd4..000000000 --- a/hr_vacation_mngmt/wizard/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import reassign_task diff --git a/hr_vacation_mngmt/wizard/reassign_task.py b/hr_vacation_mngmt/wizard/reassign_task.py deleted file mode 100644 index f3f70e003..000000000 --- a/hr_vacation_mngmt/wizard/reassign_task.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api, _ -from odoo.exceptions import UserError - - -class ReAssignTask(models.TransientModel): - _name = 'task.reassign' - - pending_tasks = fields.One2many('pending.task', related='leave_req_id.pending_tasks', string='Pending Tasks') - leave_req_id = fields.Many2one('hr.holidays', string='Leave Request') - - @api.multi - def action_approve(self): - task_pending = False - e_unavail = False - emp_unavail = [] - for task in self.pending_tasks: - if not task.assigned_to: - task_pending = True - if task_pending: - raise UserError(_('Please assign pending task to employees.')) - else: - for task in self.pending_tasks: - if task.assigned_to in task.unavailable_employee: - emp_unavail.append(task.assigned_to.name) - e_unavail = True - emp_unavail = set(emp_unavail) - emp_unavail_count = len(emp_unavail) - if e_unavail: - if emp_unavail_count == 1: - raise UserError(_('Selected employee %s is not available') % (', '.join(emp_unavail),)) - else: - raise UserError(_('Selected employees %s are not available') % (', '.join(emp_unavail),)) - - else: - manager = self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1) - holiday = self.leave_req_id - tasks = self.env['project.task'] - for task in self.pending_tasks: - if not task.assigned_to.user_id: - raise UserError(_('Please configure user for the employee %s') % (task.assigned_to.name,)) - vals = { - 'name': task.name, - 'user_id': task.assigned_to.user_id.id, - 'project_id': task.project_id.id, - 'description': task.description, - } - tasks.sudo().create(vals) - if holiday.double_validation: - return holiday.write({'state': 'validate1', 'manager_id': manager.id if manager else False}) - else: - holiday.action_validate() - - @api.multi - def cancel(self): - for task in self.pending_tasks: - task.update({'assigned_to': False}) - return {'type': 'ir.actions.act_window_close'} diff --git a/hr_vacation_mngmt/wizard/reassign_task.xml b/hr_vacation_mngmt/wizard/reassign_task.xml deleted file mode 100644 index 8625127c5..000000000 --- a/hr_vacation_mngmt/wizard/reassign_task.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Re-Assign Task - task.reassign - -
    -

    Confirm leave request and reassign pending works of the employee.

    - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/hrms_dashboard/README.rst b/hrms_dashboard/README.rst deleted file mode 100644 index 0b77756af..000000000 --- a/hrms_dashboard/README.rst +++ /dev/null @@ -1,41 +0,0 @@ -Open HRMS Dashboard v11 -======================= - -Keep your eyes on your whole Human resource analysis. - -Depends -======= -[hr] addon Odoo - -Tech -==== -* [Python] - Models -* [XML] - Odoo views - -Installation -============ -- www.odoo.com/documentation/10.0/setup/install.html -- Install our custom addon - - - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- - -Developer: Saritha Sahadevan, saritha@cybrosys.in - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.openhrms.com - diff --git a/hrms_dashboard/__init__.py b/hrms_dashboard/__init__.py deleted file mode 100644 index ed8e46e29..000000000 --- a/hrms_dashboard/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC , Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import models diff --git a/hrms_dashboard/__manifest__.py b/hrms_dashboard/__manifest__.py deleted file mode 100644 index 9bfb7d498..000000000 --- a/hrms_dashboard/__manifest__.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC , Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -{ - 'name': "Open HRMS Dashboard", - 'version': '11.0.1.0.0', - 'summary': """Open HRMS Dashboard""", - 'description': """Open HRMS Dashboard""", - 'category': 'Human Resource', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['hr', 'hr_holidays', 'hr_timesheet', 'hr_payroll', 'hr_attendance','hr_timesheet_attendance','hr_recruitment'], - 'data': ['views/dashboard_views.xml'], - 'qweb': ["static/src/xml/hrms_dashboard.xml"], - 'images': ["static/description/banner.jpg"], - 'license': "AGPL-3", - 'installable': True, - 'application': True, -} diff --git a/hrms_dashboard/docs/RELEASE_NOTES.md b/hrms_dashboard/docs/RELEASE_NOTES.md deleted file mode 100644 index d5e7f79fe..000000000 --- a/hrms_dashboard/docs/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 23.04.2018 -#### Version 11.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/hrms_dashboard/models/__init__.py b/hrms_dashboard/models/__init__.py deleted file mode 100644 index 228320371..000000000 --- a/hrms_dashboard/models/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC , Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from . import hrms_dashboard - - - diff --git a/hrms_dashboard/models/hrms_dashboard.py b/hrms_dashboard/models/hrms_dashboard.py deleted file mode 100644 index 96e69d77c..000000000 --- a/hrms_dashboard/models/hrms_dashboard.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Aswani PC, Saritha Sahadevan () -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### -from odoo import models, api, _ -from odoo.http import request - - -class Employee(models.Model): - _inherit = 'hr.employee' - - @api.model - def get_user_employee_details(self): - uid = request.session.uid - employee = self.env['hr.employee'].sudo().search_read([('user_id', '=', uid)], limit=1) - leaves_to_approve = self.env['hr.holidays'].sudo().search_count([('state', 'in', ['confirm', 'validate1']), - ('type', '=', 'remove')]) - leaves_alloc_req = self.env['hr.holidays'].sudo().search_count([('state', 'in', ['confirm', 'validate1']) - , ('type', '=', 'add')]) - timesheet_count = self.env['account.analytic.line'].sudo().search_count( - [('project_id', '!=', False), ('user_id', '=', uid)]) - timesheet_view_id = self.env.ref('hr_timesheet.hr_timesheet_line_search') - job_applications = self.env['hr.applicant'].sudo().search_count([]) - if employee: - data = { - 'leaves_to_approve': leaves_to_approve, - 'leaves_alloc_req': leaves_alloc_req, - 'emp_timesheets': timesheet_count, - 'job_applications': job_applications, - 'timesheet_view_id': timesheet_view_id - } - employee[0].update(data) - return employee diff --git a/hrms_dashboard/static/description/HRMS-BUTTON.png b/hrms_dashboard/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hrms_dashboard/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hrms_dashboard/static/description/banner.jpg b/hrms_dashboard/static/description/banner.jpg deleted file mode 100644 index 3652da349..000000000 Binary files a/hrms_dashboard/static/description/banner.jpg and /dev/null differ diff --git a/hrms_dashboard/static/description/cybro-service.png b/hrms_dashboard/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hrms_dashboard/static/description/cybro-service.png and /dev/null differ diff --git a/hrms_dashboard/static/description/cybro_logo.png b/hrms_dashboard/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hrms_dashboard/static/description/cybro_logo.png and /dev/null differ diff --git a/hrms_dashboard/static/description/dashboard.png b/hrms_dashboard/static/description/dashboard.png deleted file mode 100644 index 64ce246c3..000000000 Binary files a/hrms_dashboard/static/description/dashboard.png and /dev/null differ diff --git a/hrms_dashboard/static/description/icon.png b/hrms_dashboard/static/description/icon.png deleted file mode 100644 index 91ef06c51..000000000 Binary files a/hrms_dashboard/static/description/icon.png and /dev/null differ diff --git a/hrms_dashboard/static/description/index.html b/hrms_dashboard/static/description/index.html deleted file mode 100644 index 03a82f52a..000000000 --- a/hrms_dashboard/static/description/index.html +++ /dev/null @@ -1,76 +0,0 @@ -
    -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

    -
    -
    -
    - -
    -
    -
    -
    - - - -
    -
    -
    -
    - -
    -
    -
    -

    Open HRMS Dashboard

    -

    Keep your eyes on your whole Human resource analysis

    -

    Cybrosys Technologies

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -

    Our Odoo Services

    -
    -
    - -
    - - -
    -

    Need Any Help?

    - -
    \ No newline at end of file diff --git a/hrms_dashboard/static/src/css/hrms_dashboard.css b/hrms_dashboard/static/src/css/hrms_dashboard.css deleted file mode 100644 index 2cbceda5a..000000000 --- a/hrms_dashboard/static/src/css/hrms_dashboard.css +++ /dev/null @@ -1,575 +0,0 @@ -.o_dashboards{ - padding-top :15px; - background-color: #f8faff !important; -} -.social-box { - min-height: 160px; - margin-bottom: 1.5rem; - text-align: center; - background: #fff; } - .social-box i { - display: block; - margin: -1px -1px 0; - font-size: 40px; - line-height: 90px; - background: #e9ecef; } - .social-box .chart-wrapper { - height: 90px; - margin: -90px 0 0; } - .social-box .chart-wrapper canvas { - width: 100% !important; - height: 90px !important; } - .social-box ul { - padding: 10px 0; - list-style: none; } - .social-box ul li { - display: block; - float: left; - width: 50%; - padding-top: 10px; - font-size: 18px; } - .social-box ul li:first-child { - border-right: 1px solid #c2cfd6; } - .social-box ul li strong { - display: block; - font-size: 20px; } - .social-box ul li span { - font-size: 18px; - font-weight: 500; - color: #949CA0; - text-transform: uppercase; } - .social-box.facebook i { - color: #fff; - background: #3b5998; } - .social-box.twitter i { - color: #fff; - background: #00aced; } - .social-box.linkedin i { - color: #fff; - background: #4875b4; } - .social-box.google-plus i { - color: #fff; - background: #d34836; } - - -.content { - float: left; - padding: 0 20px; - width: 100%; } - -.card { - padding-top: 0px; - padding: 14px; - margin-bottom: 1.5rem; - border-radius: 10px; - box-shadow: 2px 14px 32px 5px rgba(0, 0, 0, 0.02), 0 3px 13px 0px rgba(0, 0, 0, 0.16); - background-color: #fff; - transition: transform 0.2s ease, box-shadow 0.2s ease; - will-change: transform, box-shadow; -} -.card:hover{ - transform: translateY(-5px) translateZ(0); - box-shadow: 0 16px 32px 0 rgba(62,57,107,0.28), 0 0 0 transparent; -} - .card h4 { - font-size: 1.1rem; } - .card .user-header .media img { - border: 5px solid rgba(255, 255, 255, 0.3); - border-radius: 50%; - -webkit-border-radius: 50%; } - .card .card-header .card-actions button { - display: block; - float: left; - width: 50px; - padding: .75rem 0; - margin: 0 !important; - color: #fff; - outline: 0; - text-align: center; - background: transparent; - border: 0; - border-left: 1px solid rgba(120, 130, 140, 0.4); } - .card .card-footer { - padding: 0.65rem 1.25rem; - background-color: #f0f3f5; - border-top: 1px solid #c2cfd6; } - .card .card-footer ul li { - display: table-cell; - padding: 0 1rem; - text-align: center; } - -.breadcrumbs { - margin-top: 0; } - -/* Tabs */ -.nav-tabs a.active { - color: #555; - cursor: default; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; } -.nav-tabs .dropdown .dropdown-menu { - top: 100% !important; } - -.custom-tab .nav-tabs > a.active, .custom-tab .nav-tabs > .active > a:focus, .custom-tab .nav-tabs > li.active > a:hover { - border-color: transparent transparent; - color: #ff2e44; - position: relative; } - -.custom-tab .nav-tabs > a.active > a:after, .custom-tab .nav-tabs > li.active > a:focus:after, .custom-tab .nav-tabs > li.active > a:hover:after { - background: #ff2e44; - bottom: -1px; - content: ""; - height: 2px; - left: 0; - position: absolute; - right: 0; - width: 100%; - z-index: 999; } - -.card .card-header .card-actions { - float: right; } - .card .card-header .card-actions [class*="btn"] { - border-left: 1px solid rgba(120, 130, 140, 0.4); - color: #878787; - display: inline-block; - font-size: 16px; - float: left; - padding: 0 7px; - width: inherit; - text-align: center; } -.left-top-card-body { - display: block; - float: left; - position: relative; -} -.left-bottom-card-body{ - display: block; - float: left; - position: relative; -} -.social-buttons .card-body p button { - padding-top: 0; - padding-left: 0; - padding-bottom: 0; } -.social-buttons .only-icon .card-body p button { - padding: 0; } -.social-buttons .social i { - padding: 0 10px; - width: inherit !important; } -.social-buttons .only-text p button { - padding: 0 .5rem; } - -.buttons button { - margin: 2px 0; } - -/* Ribons */ -.corner-ribon { - text-align: center; - width: 71px; - height: 71px; - position: absolute; - right: 0; - top: 0; - font-size: 20px; } - -.corner-ribon i { - padding: 10px 0 0 35px; - color: #fff; } - -/*.black-ribon {*/ - /*background: url("../../images/twitter_corner_black.png") no-repeat; }*/ - -/*.blue-ribon {*/ - /*background: url("../../images/twitter_corner_blue.png") no-repeat; }*/ - -.twt-feed .wtt-mark { - color: rgba(255, 255, 255, 0.15); - font-size: 160px; - position: absolute; - top: 10px; - left: 40%; } - -.twt-feed { - -webkit-border-radius: 4px 4px 0 0; - color: #FFFFFF; - padding: 40px 10px 10px; - position: relative; - min-height: 170px; } - -.weather-category { - padding: 15px 0; - color: #74829C; } - .weather-category ul li { - width: 32%; - text-align: center; - border-right: 1px solid #e6e6e6; - display: inline-block; } - -.twt-feed.blue-bg { - background: #58C9F3; } - -.twt-category { - display: inline-block; - margin-bottom: 11px; - margin-top: 10px; - width: 100%; } - .twt-category ul li { - color: #bdbdbd; - font-size: 13px; } - -.twt-footer { - padding: 12px 15px; } - -.twt-footer, .twt-footer a { - color: #d2d2d2; } - -/* Button Reset */ -.btn, .button { - display: inline-block; - font-weight: 400; - text-align: center; - white-space: nowrap; - vertical-align: middle; - transition: all .15s ease-in-out; - border-radius: 0; - cursor: pointer; } - -/* Icons */ -.icon-section { - margin: 0 0 3em; - clear: both; - overflow: hidden; } - -.icon-container { - width: 240px; - padding: .7em 0; - float: left; - position: relative; - text-align: left; } - -.icon-container [class^="ti-"], -.icon-container [class*=" ti-"] { - color: #000; - position: absolute; - margin-top: 3px; - transition: .3s; } - -.icon-container:hover [class^="ti-"], -.icon-container:hover [class*=" ti-"] { - font-size: 2.2em; - margin-top: -5px; } - -.icon-container:hover .icon-name { - color: #000; } - -.icon-name { - color: #aaa; - margin-left: 35px; - font-size: 14px; - transition: .3s; } - -.icon-container:hover .icon-name { - margin-left: 45px; } - -.fontawesome-icon-list .page-header { - border-bottom: 1px solid #C9CDD7; - padding-bottom: 9px; - margin: 30px 0px 27px 0px; } -.fontawesome-icon-list h2 { - margin-top: 0; - font-size: 20px; - font-weight: 300; } -.fontawesome-icon-list i { - font-style: italic; - padding-right: 10px; } - -.social-box i { - line-height: 110px; } -.social-box ul { - display: inline-block; - margin: 7px 0 0; - padding: 10px; - width: 100%; } - .social-box ul li { - color: #949CA0; - font-size: 14px; - font-weight: 700; - padding: 0 10px 0 0; - text-align: right; } - .social-box ul li:last-child { - padding-left: 10px; - padding-right: 0; - text-align: left; } - .social-box ul li span { - font-size: 14px; } - -.login-logo { - text-align: center; - margin-bottom: 15px; } - .login-logo span { - color: #ffffff; - font-size: 24px; } - -.login-content { - max-width: 540px; - margin: 8vh auto; } - -.login-form { - background: #ffffff; - padding: 30px 30px 20px; - border-radius: 2px; } - -.login-form h4 { - color: #878787; - text-align: center; - margin-bottom: 50px; } - -.login-form .checkbox { - color: #878787; } - -.login-form .checkbox label { - text-transform: none; } - -.login-form .btn { - width: 100%; - text-transform: uppercase; - font-size: 14px; - padding: 15px; - border: 0px; } - -.login-form label { - color: #878787; - text-transform: uppercase; } - -.login-form label a { - color: #ff2e44; } - -.social-login-content { - margin: 0px -30px; - border-top: 1px solid #e7e7e7; - border-bottom: 1px solid #e7e7e7; - padding: 30px 0px; - background: #fcfcfc; } - -.social-button { - padding: 0 30px; } - .social-button .facebook { - background: #3b5998; - color: #fff; } - .social-button .facebook:hover { - background: #344e86; } - .social-button .twitter { - background: #00aced; - color: #fff; } - .social-button .twitter:hover { - background: #0099d4; } - -.social-button i { - padding: 19px; } - -.register-link a { - color: #ff2e44; } - -.cpu-load { - width: 100%; - height: 272px; - font-size: 14px; - line-height: 1.2em; } - -.cpu-load-data-content { - font-size: 18px; - font-weight: 400; - line-height: 40px; } - -.cpu-load-data { - margin-bottom: 30px; } - -.cpu-load-data li { - display: inline-block; - width: 32.5%; - text-align: center; - border-right: 1px solid #e7e7e7; } - -.cpu-load-data li:last-child { - border-right: 0px; } - -.nestable-cart { - overflow: hidden; } - -/* Forms */ -.input-group-addon { - background-color: transparent; - border-left: 0; } - -.input-group-addon, .input-group-btn { - white-space: nowrap; - vertical-align: middle; } - -.input-group-addon { - padding: .5rem .75rem; - margin-bottom: 0; - font-size: 1rem; - font-weight: 400; - line-height: 1.25; - color: #495057; - text-align: center; - background-color: #e9ecef; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: .25rem; } - -.flotTip { - background: #252525; - border: 1px solid #252525; - padding: 5px 15px; - color: #ffffff; } - -.flot-container { - box-sizing: border-box; - width: 100%; - height: 275px; - padding: 20px 15px 15px; - margin: 15px auto 30px; - background: transparent; } - -.flot-pie-container { - height: 275px; } - -.flotBar-container { - height: 275px; } - -.flot-line { - width: 100%; - height: 100%; - font-size: 14px; - line-height: 1.2em; } - -.legend table { - border-spacing: 5px; } - -#chart1, -#flotBar, -#flotCurve { - width: 100%; - height: 275px; } - -.morris-hover { - position: absolute; - z-index: 1; } - -.morris-hover.morris-default-style .morris-hover-row-label { - font-weight: bold; - margin: 0.25em 0; } - -.morris-hover.morris-default-style .morris-hover-point { - white-space: nowrap; - margin: 0.1em 0; } - -.morris-hover.morris-default-style { - border-radius: 2px; - padding: 10px 12px; - color: #666; - background: rgba(0, 0, 0, 0.7); - border: none; - color: #fff !important; } - -.morris-hover-point { - color: rgba(255, 255, 255, 0.8) !important; } - -#morris-bar-chart { - height: 285px; } - -.map, .vmap { - width: 100%; - height: 400px; } - -.btn-toolbar { - float: left !important; } - .btn-toolbar .btn-outline-secondary:not([disabled]):not(.disabled):active, - .btn-toolbar .btn-outline-secondary:not([disabled]):not(.disabled).active, - .btn-toolbar .show > .btn-outline-secondary.dropdown-toggle { - background-color: #212529; - border-color: #212529; - -webkit-box-shadow: none; - box-shadow: none; - color: #fff; } - .btn-toolbar .btn-outline-secondary:hover { - background-color: #212529; - border-color: #212529; - color: #fff; } - -/* Widget One ----------------------------*/ -.dib { - display: inline-block; } - -.stat-widget-one .stat-icon { - vertical-align: top; - margin: auto; - width: 100%; - color: #01c490; -} -.stat-widget-one { - background-color: white; - text-align: center; -} - -.stat-widget-one .stat-icon i { - font-size: 30px; - font-weight: 900; - display: inline-block; - color: #01c490;} - -.stat-widget-one .stat-text { - font-size: 14px; - color: #868e96; } - -.stat-widget-one .stat-digit { - font-size: 24px; - color: #02448b; } - -.stat-count { - font-size: 20px; - text-align: center; - color: #00438b;} - -.stat-title { - font-size: 17px; - text-align: center; - color: #00438b; } - -.bg-flat-color-1 { - background: #20a8d8; } - -.bg-flat-color-2 { - background: #63c2de; } - -.bg-flat-color-3 { - background: #ffc107; } - -.bg-flat-color-4 { - background: #f86c6b; } - -.bg-flat-color-5 { - background: #4dbd74; } - -.mb-0{ - font-size: 20px; - position: relative; - text-align: center; -} -.mb-0 .dash-title { - font-size: 20px; - text-align: center; - color: rgba(255, 255, 255, 0.81); -} -.hr_birthday { - font-size: 28px; - text-align: center; - padding: 20px 0; - color: #00438b; - font-weight: 600; -} -body .text-color { - color: #00438b; -} \ No newline at end of file diff --git a/hrms_dashboard/static/src/js/hrms_dashboard.js b/hrms_dashboard/static/src/js/hrms_dashboard.js deleted file mode 100644 index ba6fbc3f2..000000000 --- a/hrms_dashboard/static/src/js/hrms_dashboard.js +++ /dev/null @@ -1,235 +0,0 @@ -odoo.define('hrms_dashboard.Dashboard', function (require) { -"use strict"; -var ajax = require('web.ajax'); -var ControlPanelMixin = require('web.ControlPanelMixin'); -var core = require('web.core'); -var Dialog = require('web.Dialog'); -var session = require('web.session'); -var rpc = require('web.rpc'); -var utils = require('web.utils'); -var web_client = require('web.web_client'); -var Widget = require('web.Widget'); -var session = require('web.session'); -var _t = core._t; -var QWeb = core.qweb; - -var HrDashboard = Widget.extend(ControlPanelMixin, { - template: "hrms_dashboard.HrDashboardMain", - events: { - 'click .hr_leave_request_approve': 'leaves_to_approve', - 'click .hr_leave_allocations_approve': 'leave_allocations_to_approve', - 'click .hr_timesheets': 'hr_timesheets', - 'click .hr_job_application_approve': 'job_applications_to_approve', - 'click .hr_payslip':'hr_payslip', - 'click .hr_contract':'hr_contract', - 'click .hr_employee':'hr_employee', - 'click .leaves_request_month':'leaves_request_month', - 'click .leaves_request':'leaves_request' - }, - - init: function(parent, context) { - this._super(parent, context); - this.login_employee = true; - this.employee_birthday = []; - this._super(parent,context); - - }, - - start: function() { - var self = this; - for(var i in self.breadcrumbs){ - self.breadcrumbs[i].title = "Dashboard"; - } - self.update_control_panel({breadcrumbs: self.breadcrumbs}, {clear: true}); - rpc.query({ - model: "hr.employee", - method: "get_user_employee_details", - }) - .then(function (result) { - self.login_employee = result[0]; - $('.o_hr_dashboard').html(QWeb.render('ManagerDashboard', {widget: self})); - $('.o_hr_dashboard').prepend(QWeb.render('LoginEmployeeDetails', {widget: self})); - /*need to check user access levels*/ - session.user_has_group('hr.group_hr_manager').then(function(has_group){ - if(has_group == false){ - $('.employee_dashboard_main').css("display", "none"); - } - }); - }); - var today = new Date().toJSON().slice(0,10).replace(/-/g,'/'); - rpc.query({ - model: "hr.employee", - method: "search_read", - args: [ - [['birthday', '!=', false]], - ['name', 'birthday','image'] - ], - }) - .then(function (res) { - for (var i = 0; i < res.length; i++) { - var bday_dt = new Date(res[i]['birthday']); - var bday_month = bday_dt.getMonth(); - var bday_day = bday_dt.getDate(); - var today_dt = new Date( today); - var today_month = today_dt.getMonth(); - var today_day = today_dt.getDate(); - var day = new Date(); - var next_day = new Date(day.setDate(day.getDate() + 7)); - var next_week = next_day.toJSON().slice(0,10).replace(/-/g,'/'); - var bday_date = bday_dt.toJSON().slice(0,10).replace(/-/g,'/');; - if (bday_month == today_month && bday_day >= today_day && next_week >= bday_date){ - self.employee_birthday.push(res[i]); - var flag = 1; - } - } - if (flag !=1){ - self.employee_birthday = false; - } - $('.o_hr_birthday_reminder').html(QWeb.render('BirthdayEventDashboard', {widget: self})); - }); - return this._super().then(function() { - self.$el.parent().addClass('oe_background_grey'); - }); - }, - - hr_payslip: function(e){ - var self = this; - e.stopPropagation(); - e.preventDefault(); - this.do_action({ - name: _t("Employee Payslips"), - type: 'ir.actions.act_window', - res_model: 'hr.payslip', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - target: 'current' - }) - }, - - hr_contract: function(e){ - var self = this; - e.stopPropagation(); - e.preventDefault(); - this.do_action({ - name: _t("Contracts"), - type: 'ir.actions.act_window', - res_model: 'hr.contract', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - target: 'current' - }) - }, - - leaves_request_month: function(e) { - var self = this; - e.stopPropagation(); - e.preventDefault(); - var date = new Date(); - var firstDay = new Date(date.getFullYear(), date.getMonth(), 1); - var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0); - var fday = firstDay.toJSON().slice(0,10).replace(/-/g,'-'); - var lday = lastDay.toJSON().slice(0,10).replace(/-/g,'-'); - this.do_action({ - name: _t("Leave Request"), - type: 'ir.actions.act_window', - res_model: 'hr.holidays', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - domain: [['date_from','>', fday],['state','=','confirm'],['date_from','<', lday]], - target: 'current' - }) - }, - - leaves_request: function(e) { - var self = this; - e.stopPropagation(); - e.preventDefault(); - this.do_action({ - name: _t("Leave Request"), - type: 'ir.actions.act_window', - res_model: 'hr.holidays', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - domain: [['type','=','add']], - target: 'current' - }) - }, - leaves_to_approve: function(e) { - var self = this; - e.stopPropagation(); - e.preventDefault(); - this.do_action({ - name: _t("Leave Request"), - type: 'ir.actions.act_window', - res_model: 'hr.holidays', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - context: {'search_default_approve': true}, - domain: [['type','=','remove'],], - target: 'current' - }) - }, - leave_allocations_to_approve: function(e) { - var self = this; - e.stopPropagation(); - e.preventDefault(); - this.do_action({ - name: _t("Leave Allocation Request"), - type: 'ir.actions.act_window', - res_model: 'hr.holidays', - view_mode: 'tree,form,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'form']], - context: {'search_default_approve': true}, - domain: [['type','=','add'],], - target: 'current' - }) - }, - - hr_timesheets: function(e) { - var self = this; - event.stopPropagation(); - event.preventDefault(); - this.do_action({ - name: _t("Timesheets"), - type: 'ir.actions.act_window', - res_model: 'account.analytic.line', - view_mode: 'tree,form', - view_type: 'form', - views: [[false, 'list'], [false, 'form']], - context: { - 'search_default_employee_id': [self.login_employee.id], - 'search_default_month': true, - }, - domain: [['project_id', '!=', false]], - target: 'current' - }) - }, - job_applications_to_approve: function(event){ - var self = this; - event.stopPropagation(); - event.preventDefault(); - this.do_action({ - name: _t("Applications"), - type: 'ir.actions.act_window', - res_model: 'hr.applicant', - view_mode: 'tree,kanban,form,pivot,graph,calendar', - view_type: 'form', - views: [[false, 'list'],[false, 'kanban'],[false, 'form'], - [false, 'pivot'],[false, 'graph'],[false, 'calendar']], - context: {}, - target: 'current' - }) - }, -}); - -core.action_registry.add('hr_dashboard', HrDashboard); - -return HrDashboard; - -}); diff --git a/hrms_dashboard/static/src/xml/hrms_dashboard.xml b/hrms_dashboard/static/src/xml/hrms_dashboard.xml deleted file mode 100644 index 16d3f9941..000000000 --- a/hrms_dashboard/static/src/xml/hrms_dashboard.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -

    -

    - -

    -

    Leave Request

    -
    -
    -
    -
    -
    -
    -

    -

    -

    -

    This Month

    -
    -
    -
    -
    -
    -
    -

    -

    -

    -

    To Approve

    -
    -
    -
    -
    -
    -
    -
    -

    -

    -

    -

    Leave Allocations

    -
    -
    -
    -
    -
    -
    -

    -

    -

    -

    Job Applications

    -
    -
    -
    -
    -
    - - - -
    -
    - Upcoming Birthdays -
    -
    -
    - -
    -
    -
    -
    - - - -
    -

    -

    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - -
    -

    -

    -
    -
    - -
    -
    -
    -
    -
    -
    -
    Payslips
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    Timesheets
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    Contracts
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/hrms_dashboard/views/dashboard_views.xml b/hrms_dashboard/views/dashboard_views.xml deleted file mode 100644 index f18ac8478..000000000 --- a/hrms_dashboard/views/dashboard_views.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Dashboard - hr_dashboard - - - - -