diff --git a/hr_custody/README.rst b/hr_custody/README.rst deleted file mode 100644 index 51301cfbf..000000000 --- a/hr_custody/README.rst +++ /dev/null @@ -1,47 +0,0 @@ -Open HRMS Custody Management -============================ - -Functionality to give and track the assets of a company to employees. - - Creates a new menu item Custody Management under Employees - - Can create custody contract with an employee - - Can take the report of custody - -Depends -======= -[hr, mail, hr_employee_updation] 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 (AGPLv3) -(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 ------- - -Developers: Avinash Nk - Jesni Banu - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_custody/__init__.py b/hr_custody/__init__.py deleted file mode 100644 index 07a62f397..000000000 --- a/hr_custody/__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 (). -# Authors: Avinash Nk, 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 -from . import reports diff --git a/hr_custody/__manifest__.py b/hr_custody/__manifest__.py deleted file mode 100644 index 372f4223b..000000000 --- a/hr_custody/__manifest__.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of Open HRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Authors: Avinash Nk, 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 Custody', - 'version': '10.0.1.0.0', - 'summary': """Manage the company properties when it is in the custody of an employee""", - 'description': 'Manage the company properties when it is in the custody of an employee', - 'category': 'Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['hr', 'mail', 'hr_employee_updation'], - 'data': [ - 'security/ir.model.access.csv', - 'security/custody_security.xml', - 'views/wizard_reason_view.xml', - 'views/custody_view.xml', - 'views/hr_custody_notification.xml', - 'views/hr_employee_view.xml', - 'views/notification_mail.xml', - 'reports/custody_report.xml' - ], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'demo': [], - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_custody/doc/RELEASE_NOTES.md b/hr_custody/doc/RELEASE_NOTES.md deleted file mode 100644 index 946cda1b9..000000000 --- a/hr_custody/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_custody - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_custody/models/__init__.py b/hr_custody/models/__init__.py deleted file mode 100644 index 5df886c18..000000000 --- a/hr_custody/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 (). -# Authors: Avinash Nk, 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 custody -from . import hr_employee -from . import wizard_reason diff --git a/hr_custody/models/custody.py b/hr_custody/models/custody.py deleted file mode 100644 index 24e837bbc..000000000 --- a/hr_custody/models/custody.py +++ /dev/null @@ -1,208 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Authors: Avinash Nk, 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, timedelta -from odoo import models, fields, api, _ -from odoo.exceptions import Warning, UserError -from odoo.tools import image_resize_images - - -class HrCustody(models.Model): - """ - Hr custody contract creation model. - """ - _name = 'hr.custody' - _description = 'Hr Custody Management' - _inherit = ['mail.thread', 'ir.needaction_mixin'] - - def mail_reminder(self): - now = datetime.now() + timedelta(days=1) - date_now = now.date() - match = self.search([('state', '=', 'approved')]) - for i in match: - if i.return_date: - exp_date = fields.Date.from_string(i.return_date) - if exp_date <= date_now: - base_url = self.env['ir.config_parameter'].get_param('web.base.url') - url = base_url + _('/web#id=%s&view_type=form&model=hr.custody&menu_id=') % i.id - mail_content = _('Hi %s,
As per the %s you took %s on %s for the reason of %s. S0 here we ' - 'remind you that you have to return that on or before %s. Otherwise, you can ' - 'renew the reference number(%s) by extending the return date through following ' - 'link.
') % \ - (i.employee.name, i.name, i.custody_name.name, i.date_request, i.purpose, - date_now, i.name, url, i.name) - main_content = { - 'subject': _('REMINDER On %s') % i.name, - 'author_id': self.env.user.partner_id.id, - 'body_html': mail_content, - 'email_to': i.employee.work_email, - } - mail_id = self.env['mail.mail'].create(main_content) - mail_id.mail_message_id.body = mail_content - mail_id.send() - if i.employee.user_id: - mail_id.mail_message_id.write({'needaction_partner_ids': [(4, i.employee.user_id.partner_id.id)]}) - mail_id.mail_message_id.write({'partner_ids': [(4, i.employee.user_id.partner_id.id)]}) - - @api.model - def create(self, vals): - vals['name'] = self.env['ir.sequence'].next_by_code('hr.custody') - return super(HrCustody, self).create(vals) - - @api.multi - def sent(self): - self.state = 'to_approve' - - @api.multi - def send_mail(self): - template = self.env.ref('hr_custody.custody_email_notification_template') - self.env['mail.template'].browse(template.id).send_mail(self.id) - self.mail_send = True - - @api.multi - def set_to_draft(self): - self.state = 'draft' - - @api.multi - def renew_approve(self): - for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): - if custody.state == "approved": - raise UserError(_("Custody is not available now")) - self.return_date = self.renew_date - self.renew_date = '' - self.state = 'approved' - - @api.multi - def renew_refuse(self): - for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): - if custody.state == "approved": - raise UserError(_("Custody is not available now")) - self.renew_date = '' - self.state = 'approved' - - @api.multi - def approve(self): - for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): - if custody.state == "approved": - raise UserError(_("Custody is not available now")) - self.state = 'approved' - - @api.multi - def set_to_return(self): - self.state = 'returned' - self.return_date = fields.datetime.now() - - # return date validation - @api.constrains('return_date') - def validate_return_date(self): - if self.return_date < self.date_request: - raise Warning('Please Give Valid Return Date') - - name = fields.Char(string='Code', copy=False) - company_id = fields.Many2one('res.company', 'Company', readonly=True, - default=lambda self: self.env.user.company_id) - rejected_reason = fields.Text(string='Rejected Reason', copy=False, readonly=1) - renew_rejected_reason = fields.Text(string='Renew Rejected Reason', copy=False, readonly=1) - date_request = fields.Date(string='Requested Date', required=True, track_visibility='always', readonly=True, - states={'draft': [('readonly', False)]}) - employee = fields.Many2one('hr.employee', string='Employee', required=True, readonly=True, - states={'draft': [('readonly', False)]}) - purpose = fields.Char(string='Reason', track_visibility='always', required=True, readonly=True, - states={'draft': [('readonly', False)]}) - custody_name = fields.Many2one('custody.property', string='Property', required=True, readonly=True, - states={'draft': [('readonly', False)]}) - return_date = fields.Date(string='Return Date', required=True, track_visibility='always', readonly=True, - states={'draft': [('readonly', False)]}) - renew_date = fields.Date(string='Renewal Return Date', track_visibility='always', readonly=True, copy=False) - notes = fields.Html(string='Notes') - renew_return_date = fields.Boolean(default=False, copy=False) - renew_reject = fields.Boolean(default=False, copy=False) - state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'), ('approved', 'Approved'), - ('returned', 'Returned'), ('rejected', 'Refused')], string='Status', default='draft', - track_visibility='always') - mail_send = fields.Boolean(string="Mail Send") - - -class HrPropertyName(models.Model): - """ - Hr property creation model. - """ - _name = 'custody.property' - _description = 'Property Name' - - name = fields.Char(string='Property Name', required=True) - image = fields.Binary( - "Image", attachment=True, - help="This field holds the image used for this provider, limited to 1024x1024px") - image_medium = fields.Binary( - "Medium-sized image", attachment=True, - help="Medium-sized image of this provider. It is automatically " - "resized as a 128x128px image, with aspect ratio preserved. " - "Use this field in form views or some kanban views.") - image_small = fields.Binary( - "Small-sized image", attachment=True, - help="Small-sized image of this provider. It is automatically " - "resized as a 64x64px image, with aspect ratio preserved. " - "Use this field anywhere a small image is required.") - desc = fields.Html(string='Description') - company_id = fields.Many2one('res.company', 'Company', - default=lambda self: self.env.user.company_id) - - @api.model - def create(self, vals): - image_resize_images(vals) - return super(HrPropertyName, self).create(vals) - - @api.multi - def write(self, vals): - image_resize_images(vals) - return super(HrPropertyName, self).write(vals) - - -class HrReturnDate(models.TransientModel): - """Hr custody contract renewal wizard""" - _name = 'wizard.return.date' - _description = 'Hr Custody Name' - - returned_date = fields.Date(string='Renewal Date', required=1) - - # renewal date validation - @api.constrains('returned_date') - def validate_return_date(self): - context = self._context - custody_obj = self.env['hr.custody'].search([('id', '=', context.get('custody_id'))]) - if self.returned_date <= custody_obj.date_request: - raise Warning('Please Give Valid Renewal Date') - - @api.multi - def proceed(self): - context = self._context - custody_obj = self.env['hr.custody'].search([('id', '=', context.get('custody_id'))]) - custody_obj.write({'renew_return_date': True, - 'renew_date': self.returned_date, - 'state': 'to_approve'}) diff --git a/hr_custody/models/hr_employee.py b/hr_custody/models/hr_employee.py deleted file mode 100644 index 1cf7b1421..000000000 --- a/hr_custody/models/hr_employee.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Authors: Avinash Nk, 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 HrCustody(models.Model): - _inherit = 'hr.employee' - - custody_count = fields.Integer(compute='_custody_count', string='# Custody') - equipment_count = fields.Integer(compute='_equipment_count', string='# Equipments') - - # count of all custody contracts - @api.multi - def _custody_count(self): - for each in self: - custody_ids = self.env['hr.custody'].search([('employee', '=', each.id)]) - each.custody_count = len(custody_ids) - - # count of all custody contracts that are in approved state - @api.multi - def _equipment_count(self): - for each in self: - equipment_obj = self.env['hr.custody'].search([('employee', '=', each.id), ('state', '=', 'approved')]) - equipment_ids = [] - for each1 in equipment_obj: - if each1.custody_name.id not in equipment_ids: - equipment_ids.append(each1.custody_name.id) - each.equipment_count = len(equipment_ids) - - # smart button action for returning the view of all custody contracts related to the current employee - @api.multi - def custody_view(self): - for each1 in self: - custody_obj = self.env['hr.custody'].search([('employee', '=', each1.id)]) - custody_ids = [] - for each in custody_obj: - custody_ids.append(each.id) - view_id = self.env.ref('hr_custody.hr_custody_form_view').id - if custody_ids: - if len(custody_ids) <= 1: - value = { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'hr.custody', - 'view_id': view_id, - 'type': 'ir.actions.act_window', - 'name': _('Custody'), - 'res_id': custody_ids and custody_ids[0] - } - else: - value = { - 'domain': str([('id', 'in', custody_ids)]), - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'hr.custody', - 'view_id': False, - 'type': 'ir.actions.act_window', - 'name': _('Custody'), - 'res_id': custody_ids - } - - return value - - # smart button action for returning the view of all custody contracts that are in approved state, - # related to the current employee - @api.multi - def equipment_view(self): - for each1 in self: - equipment_obj = self.env['hr.custody'].search([('employee', '=', each1.id), ('state', '=', 'approved')]) - equipment_ids = [] - for each in equipment_obj: - if each.custody_name.id not in equipment_ids: - equipment_ids.append(each.custody_name.id) - view_id = self.env.ref('hr_custody.custody_custody_form_view').id - if equipment_ids: - if len(equipment_ids) <= 1: - value = { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'custody.property', - 'view_id': view_id, - 'type': 'ir.actions.act_window', - 'name': _('Equipments'), - 'res_id': equipment_ids and equipment_ids[0] - } - else: - value = { - 'domain': str([('id', 'in', equipment_ids)]), - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'custody.property', - 'view_id': False, - 'type': 'ir.actions.act_window', - 'name': _('Equipments'), - 'res_id': equipment_ids - } - - return value diff --git a/hr_custody/models/wizard_reason.py b/hr_custody/models/wizard_reason.py deleted file mode 100644 index c98540ec2..000000000 --- a/hr_custody/models/wizard_reason.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 (). -# Authors: Avinash Nk, 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 WizardReason(models.TransientModel): - """ - Hr custody contract refuse wizard. - """ - _name = 'wizard.reason' - - @api.multi - def send_reason(self): - context = self._context - reject_obj = self.env[context.get('model_id')].search([('id', '=', context.get('reject_id'))]) - if 'renew' in context.keys(): - reject_obj.write({'state': 'approved', - 'renew_reject': True, - 'renew_rejected_reason': self.reason}) - else: - if context.get('model_id') == 'hr.holidays': - reject_obj.write({'rejected_reason': self.reason}) - reject_obj.action_refuse() - else: - reject_obj.write({'state': 'rejected', - 'rejected_reason': self.reason}) - - reason = fields.Text(string="Reason") diff --git a/hr_custody/reports/__init__.py b/hr_custody/reports/__init__.py deleted file mode 100644 index 6341ef439..000000000 --- a/hr_custody/reports/__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 (). -# Authors: Avinash Nk, 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 custody_report diff --git a/hr_custody/reports/custody_report.py b/hr_custody/reports/custody_report.py deleted file mode 100644 index 4ca04e1b1..000000000 --- a/hr_custody/reports/custody_report.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Authors: Avinash Nk, 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, tools - - -class CustodyHistory(models.Model): - _name = "report.custody" - _description = "Custody Analysis" - _auto = False - - name = fields.Char(string='Code') - date_request = fields.Date(string='Requested Date') - employee = fields.Many2one('hr.employee', string='Employee') - purpose = fields.Char(string='Reason') - custody_name = fields.Many2one('custody.property', string='Custody Name') - return_date = fields.Date(string='Return Date') - renew_date = fields.Date(string='Renewal Return Date') - renew_return_date = fields.Boolean(string='Renewal Return Date') - state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'), ('approved', 'Approved'), - ('returned', 'Returned'), ('rejected', 'Refused')], string='Status') - - _order = 'name desc' - - def _select(self): - select_str = """ - SELECT - (select 1 ) AS nbr, - t.id as id, - t.name as name, - t.date_request as date_request, - t.employee as employee, - t.purpose as purpose, - t.custody_name as custody_name, - t.return_date as return_date, - t.renew_date as renew_date, - t.renew_return_date as renew_return_date, - t.state as state - """ - return select_str - - def _group_by(self): - group_by_str = """ - GROUP BY - t.id, - name, - date_request, - employee, - purpose, - custody_name, - return_date, - renew_date, - renew_return_date, - state - """ - return group_by_str - - def init(self): - tools.sql.drop_view_if_exists(self._cr, 'report_custody') - self._cr.execute(""" - CREATE view report_custody as - %s - FROM hr_custody t - %s - """ % (self._select(), self._group_by())) diff --git a/hr_custody/reports/custody_report.xml b/hr_custody/reports/custody_report.xml deleted file mode 100644 index 402d92e7c..000000000 --- a/hr_custody/reports/custody_report.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - report.custody.pivot - report.custody - - - - - - - - - Custody Analysis - report.custody - form - pivot - {'group_by_no_leaf':1,'group_by':[]} - This report allows you to analyse all Custody Requests. - - - - - \ No newline at end of file diff --git a/hr_custody/security/custody_security.xml b/hr_custody/security/custody_security.xml deleted file mode 100644 index 311521f17..000000000 --- a/hr_custody/security/custody_security.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - Custody Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Custody Request Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - diff --git a/hr_custody/security/ir.model.access.csv b/hr_custody/security/ir.model.access.csv deleted file mode 100644 index 2c8043f12..000000000 --- a/hr_custody/security/ir.model.access.csv +++ /dev/null @@ -1,13 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_custody_hr","hr.custody.hr","model_hr_custody","hr.group_hr_manager",1,1,1,1 -"access_hr_custody_hr_manager","hr.custody.user","model_hr_custody","hr.group_hr_user",1,1,1,1 -"access_hr_custody_hr_employee","hr.custody.employee","model_hr_custody","base.group_user",1,1,1,0 -"access_hr_custody_hr1","hr.custody.hr1","model_custody_property","hr.group_hr_manager",1,1,1,1 -"access_hr_custody_hr_manager1","hr.custody.user1","model_custody_property","hr.group_hr_user",1,1,1,1 -"access_hr_custody_hr_employee1","hr.custody.employee1","model_custody_property","base.group_user",1,1,1,0 -"access_hr_custody_hr2","hr.custody.hr2","model_wizard_return_date","hr.group_hr_manager",1,1,1,1 -"access_hr_custody_hr3","hr.custody.hr3","model_report_custody","hr.group_hr_manager",1,1,1,1 -"access_hr_custody_hr_manager2","hr.custody.user2","model_wizard_return_date","hr.group_hr_user",1,1,1,1 -"access_hr_custody_hr_manager3","hr.custody.user3","model_report_custody","hr.group_hr_user",1,1,1,1 -"access_hr_custody_hr_employee2","hr.custody.employee2","model_wizard_return_date","base.group_user",1,1,1,0 - diff --git a/hr_custody/static/description/HRMS-BUTTON.png b/hr_custody/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_custody/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_custody/static/description/banner.jpg b/hr_custody/static/description/banner.jpg deleted file mode 100644 index 6469f976b..000000000 Binary files a/hr_custody/static/description/banner.jpg and /dev/null differ diff --git a/hr_custody/static/description/custody_property.png b/hr_custody/static/description/custody_property.png deleted file mode 100644 index 09cdde7f3..000000000 Binary files a/hr_custody/static/description/custody_property.png and /dev/null differ diff --git a/hr_custody/static/description/custody_request.png b/hr_custody/static/description/custody_request.png deleted file mode 100644 index 1d82e0420..000000000 Binary files a/hr_custody/static/description/custody_request.png and /dev/null differ diff --git a/hr_custody/static/description/cybro-service.png b/hr_custody/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_custody/static/description/cybro-service.png and /dev/null differ diff --git a/hr_custody/static/description/cybro_logo.png b/hr_custody/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_custody/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_custody/static/description/icon.png b/hr_custody/static/description/icon.png deleted file mode 100644 index 8c486ecc1..000000000 Binary files a/hr_custody/static/description/icon.png and /dev/null differ diff --git a/hr_custody/static/description/index.html b/hr_custody/static/description/index.html deleted file mode 100644 index 61c9346ca..000000000 --- a/hr_custody/static/description/index.html +++ /dev/null @@ -1,111 +0,0 @@ - -
-
-

Open HRMS

-

Most advanced open source HR management software

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

Open HRMS Custody Management

-

Manages Custody Handling Process

-

Cybrosys Technologies

-
-
-

Features:

-
- Managing custody handling process.
- Option to renewal.
- Option to take reports.
-
-
-
- -
-
-
-

Overview

-

- Blues over resource tracking? No more worries. - OHRMS Custody Management system constitutes the ultimate - solution for a transparent custody of company resources. -

-
-
-
- -
-
-

Custody Request

-
-

- ☛ Create a Custody Request.
- ☛ Send for Approval.
-

-
- -
-
-
-
- -
-
-

Property

-
-

- ☛ Create a Property of Company.
-

-

- -
-
-
-
- - -
-
-

Our Odoo Services

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

Need Any Help?

- -
- diff --git a/hr_custody/views/custody_view.xml b/hr_custody/views/custody_view.xml deleted file mode 100644 index 9a95fe075..000000000 --- a/hr_custody/views/custody_view.xml +++ /dev/null @@ -1,222 +0,0 @@ - - - - - Custody Code - hr.custody - CR - - - - - - wizard.return.date.form - wizard.return.date - -
- - - - - -
-
-
-
-
- - - custody.property.form - custody.property - -
- - -
-

-
- - - - - - - - - - - -
-
-
-
- - - Custody Request - wizard.return.date - form - form - - new - - - - hr.custody.form - hr.custody - -
-
-
- -

- -

- - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
-
-
- - - hr.custody.tree - hr.custody - - - - - - - - - - - - - - - hr_property_tree_view.tree - custody.property - - - - - - - - - hr.custody.search - hr.custody - - - - - - - - - - - - - - - - - - - - - Custody - hr.custody - form - tree,form - - -

- Click to Create a New Record. -

-
-
- - - Property - custody.property - form - tree,form - -

- Click to Create a New Record. -

-
-
- - - - - - -
-
\ No newline at end of file diff --git a/hr_custody/views/hr_custody_notification.xml b/hr_custody/views/hr_custody_notification.xml deleted file mode 100644 index dbe813ae3..000000000 --- a/hr_custody/views/hr_custody_notification.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - HR Custody Return Notification - 1 - days - -1 - - - - - - - diff --git a/hr_custody/views/hr_employee_view.xml b/hr_custody/views/hr_employee_view.xml deleted file mode 100644 index 148f55ac1..000000000 --- a/hr_custody/views/hr_employee_view.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - hr.employee.form.inherit.view - hr.employee - - -
- - -
-
-
-
-
\ No newline at end of file diff --git a/hr_custody/views/notification_mail.xml b/hr_custody/views/notification_mail.xml deleted file mode 100644 index 189af3fa8..000000000 --- a/hr_custody/views/notification_mail.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Custody e-mail template - ${object.company_id and object.company_id.email or ''} - Notification to return company asset-${object.custody_name.name} - ${object.email|safe} - ${object.lang} - - - - Dear ${(object.employee.name)},

- You are in possession of the company asset - "${(object.custody_name.name)}" - since ${(object.return_date)}.

- Please kindly return the property as soon as possible.

- Regards,

- ${(object.company_id.name)}]]> -
-
-
-
\ No newline at end of file diff --git a/hr_custody/views/wizard_reason_view.xml b/hr_custody/views/wizard_reason_view.xml deleted file mode 100644 index 64e79a125..000000000 --- a/hr_custody/views/wizard_reason_view.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - wizard.reason.form - wizard.reason - -
- - - -
-
-
-
-
- - - Update Reason - wizard.reason - form - form - - new - -
-
\ No newline at end of file diff --git a/hr_employee_shift/README.rst b/hr_employee_shift/README.rst deleted file mode 100644 index af76a519c..000000000 --- a/hr_employee_shift/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -OHRMS Employee Shift v10 -======================== - -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/RELEASE_NOTES.md b/hr_employee_shift/RELEASE_NOTES.md deleted file mode 100644 index 932b379ec..000000000 --- a/hr_employee_shift/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_employee_shift - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project 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 ce263e552..000000000 --- a/hr_employee_shift/__manifest__.py +++ /dev/null @@ -1,46 +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': '10.0.1.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'], - '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', - ], - 'images': ["static/description/banner.jpg"], - 'license': "AGPL-3", - 'installable': True, - 'application': True, -} 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 532d3f2d7..000000000 --- a/hr_employee_shift/models/hr_employee_contract.py +++ /dev/null @@ -1,75 +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 7fd6a3e1d..000000000 --- a/hr_employee_shift/models/hr_employee_shift.py +++ /dev/null @@ -1,41 +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 HrEmployeeShift(models.Model): - _inherit = 'resource.calendar' - - 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) - - @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 cea71fbf1..000000000 --- a/hr_employee_shift/static/description/index.html +++ /dev/null @@ -1,129 +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?

- -
- 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 bf9ddbec0..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 aaecc2768..000000000 --- a/hr_employee_shift/views/hr_employee_shift_view.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - 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_employee_transfer/README.rst b/hr_employee_transfer/README.rst deleted file mode 100644 index 7ace5dbfb..000000000 --- a/hr_employee_transfer/README.rst +++ /dev/null @@ -1,39 +0,0 @@ -Open HRMS Employee Transfer v10 -=============================== - -Employee transfer between branches. - -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: Sreejith P @ cybrosys, sreejith@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_transfer/__init__.py b/hr_employee_transfer/__init__.py deleted file mode 100644 index a0fdc10fe..000000000 --- a/hr_employee_transfer/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from . import models diff --git a/hr_employee_transfer/__manifest__.py b/hr_employee_transfer/__manifest__.py deleted file mode 100644 index 93472ca4c..000000000 --- a/hr_employee_transfer/__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: Sreejith P () -# -# 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 Branch Transfer', - 'version': '10.0.1.0.0', - 'summary': 'Employee transfer between branches', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': 'https://www.openhrms.com', - 'depends': ['base', - 'hr_employee_updation' - ], - 'data': [ - 'views/employee_transfer.xml', - 'security/ir.model.access.csv', - 'security/branch_security.xml', - ], - 'images': ['static/description/banner.jpg'], - 'installable': True, - 'application': True, - 'auto_install': False, - 'license': 'AGPL-3', -} diff --git a/hr_employee_transfer/docs/RELEASE_NOTES.md b/hr_employee_transfer/docs/RELEASE_NOTES.md deleted file mode 100644 index 2dba1e095..000000000 --- a/hr_employee_transfer/docs/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_employee_transfer - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/hr_employee_transfer/models/__init__.py b/hr_employee_transfer/models/__init__.py deleted file mode 100644 index 3adb57604..000000000 --- a/hr_employee_transfer/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -from . import employee_transfer -from . import hr_contract -from . import res_company diff --git a/hr_employee_transfer/models/employee_transfer.py b/hr_employee_transfer/models/employee_transfer.py deleted file mode 100644 index 6d17c07a0..000000000 --- a/hr_employee_transfer/models/employee_transfer.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- -from datetime import date -from odoo import models, fields, api, _ -from odoo.tools import DEFAULT_SERVER_DATE_FORMAT - - -class EmployeeTransfer(models.Model): - _name = 'employee.transfer' - _description = 'Employee Transfer' - _order = "id desc" - - def _default_employee(self): - emp_ids = self.env['hr.employee'].search([('user_id', '=', self.env.uid)]) - return emp_ids and emp_ids[0] or False - - name = fields.Char(string='Name', help='Give a name to the Transfer', copy=False, default="/") - employee_id = fields.Many2one('hr.employee', string='Employee', required=True) - date = fields.Date(string='Date', default=fields.Date.today()) - branch = fields.Many2one('transfer.company', string='Transfer Branch', requried=True, copy=False) - state = fields.Selection( - [('draft', 'New'), ('cancel', 'Cancelled'), ('transfer', 'Transferred'), ('done', 'Post')], - string='Status', readonly=True, copy=False, default='draft') - sequence_number = fields.Integer(string='Sequence Number', help='A unique sequence number for the Transfer', - default=1, copy=False) - company_id = fields.Many2one('res.company', string='Company', required=True, - related='employee_id.company_id', store=True) - note = fields.Text(string='Internal Notes') - responsible = fields.Many2one('hr.employee', string='Responsible', default=_default_employee, readonly=True) - - @api.one - def transfer(self): - obj_emp = self.env['hr.employee'].browse(self.employee_id.id) - emp = {} - for this in self: - emp = { - 'name': self.employee_id.name, - 'company_id': self.branch.company_id, - - } - new_emp = self.env['hr.employee'].create(emp) - if obj_emp.address_home_id: - obj_emp.address_home_id.active = False - for obj_contract in self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]): - if obj_contract.date_end: - continue - if not obj_contract.date_end: - obj_contract.write({'date_end': date.today().strftime(DEFAULT_SERVER_DATE_FORMAT)}) - self.wage = obj_contract.wage - self.state = 'transfer' - self.employee_id = new_emp - obj_emp.write({'active': False}) - - @api.multi - def receive_employee(self): - print self.employee_id.company_id.id - for this in self: - if this._context is None: - context = {} - partner = {} - for i in this: - partner = { - 'name': i.employee_id.name, - 'company_id': i.branch.company_id, - } - partner_created = self.env['res.partner'].create(partner) - self.env['hr.employee'].browse(this.employee_id.id).write({'address_home_id': partner_created.id}) - return { - 'name': _('Contract'), - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'hr.contract', - 'type': 'ir.actions.act_window', - 'target': 'current', - 'context': {'default_employee_id': this.employee_id.id, - 'default_date_start': this.date, - 'default_emp_transfer': this.id, - }, - } - - @api.one - def cancel_transfer(self): - obj_emp = self.env['hr.employee'].browse(self.employee_id.id) - emp = { - 'name': self.employee_id.name, - 'company_id': self.company_id.id, - } - obj_emp.write(emp) - for obj_contract in self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]): - obj_contract.unlink() - self.state = 'cancel' diff --git a/hr_employee_transfer/models/hr_contract.py b/hr_employee_transfer/models/hr_contract.py deleted file mode 100644 index 87fc8a0d2..000000000 --- a/hr_employee_transfer/models/hr_contract.py +++ /dev/null @@ -1,16 +0,0 @@ -from odoo import models, fields, api - - -class HrContract(models.Model): - _inherit = 'hr.contract' - - company_id = fields.Many2one('res.company', 'Company', default=lambda self: self.env.user.company_id) - from_transfer = fields.Boolean(string='Transferred', default=False) - emp_transfer = fields.Many2one('employee.transfer', string='Transferred Employee') - - @api.model - def create(self, vals): - res = super(HrContract, self).create(vals) - if res.emp_transfer: - self.env['employee.transfer'].browse(res.emp_transfer.id).write({'state': 'done'}) - return res diff --git a/hr_employee_transfer/models/hr_employee.py b/hr_employee_transfer/models/hr_employee.py deleted file mode 100644 index 42df9efdd..000000000 --- a/hr_employee_transfer/models/hr_employee.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import models, fields, api - - -class HrContract(models.Model): - _inherit = 'hr.employee' - - transfer_detail = fields.One2many('transfer.detail', 'employee_id', string='Transfer Details') - - -class TransferDetails(models.Model): - - _name = 'transfer.detail' - _description = 'Transfer Details' - - employee_id = fields.Many2one('hr.employee', string='Employee') - date = fields.Date(string='Date', copy=False) - company_id = fields.Many2one('res.company', string='Company') - pre_company = fields.Many2one('res.company', string='Previous Company') diff --git a/hr_employee_transfer/models/res_company.py b/hr_employee_transfer/models/res_company.py deleted file mode 100644 index 77c228a24..000000000 --- a/hr_employee_transfer/models/res_company.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import models, fields, api - - -class EmployeeTransfer(models.Model): - _name = 'transfer.company' - _description = 'Transfer Company' - _order = "id desc" - - name = fields.Char(string='Name', copy=False, ondelete='cascade') - company_id = fields.Integer(string='Company', help='Company name same as res.company', copy=False) - - -class ResCompany(models.Model): - _inherit = 'res.company' - - def init(self): - obj_company = self.env['res.company'].search([]) - - for company in obj_company: - obj_branch = self.env['transfer.company'].search([('company_id', '=', company.id)]) - com = {} - if not obj_branch: - com = { - 'name': company.name, - 'company_id': company.id, - } - obj = self.env['transfer.company'].create(com) - - @api.model - def create(self, res): - result = super(ResCompany, self).create(res) - com = {} - com = { - 'name': result.name, - 'company_id': result.id, - - } - self.env['transfer.company'].create(com) - return result diff --git a/hr_employee_transfer/security/branch_security.xml b/hr_employee_transfer/security/branch_security.xml deleted file mode 100644 index f22cc5870..000000000 --- a/hr_employee_transfer/security/branch_security.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Employee Rule - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Contract Rules - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - diff --git a/hr_employee_transfer/security/ir.model.access.csv b/hr_employee_transfer/security/ir.model.access.csv deleted file mode 100644 index beea229f4..000000000 --- a/hr_employee_transfer/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_employee_transfer,employee.transfer,model_employee_transfer,hr.group_hr_user,1,1,0,0 -access_employee_transfer_manager,employee.transfer.manager,model_employee_transfer,hr.group_hr_manager,1,1,1,0 -access_employee_transfer_company,employee.company.manager,base.model_res_company,hr.group_hr_manager,1,1,1,0 -access_transfer_company,transfer.company.manager,model_transfer_company,hr.group_hr_manager,1,1,1,0 diff --git a/hr_employee_transfer/static/description/HRMS-BUTTON.png b/hr_employee_transfer/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_employee_transfer/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/banner.jpg b/hr_employee_transfer/static/description/banner.jpg deleted file mode 100644 index 1859d8b14..000000000 Binary files a/hr_employee_transfer/static/description/banner.jpg and /dev/null differ diff --git a/hr_employee_transfer/static/description/create_a_transfer.png b/hr_employee_transfer/static/description/create_a_transfer.png deleted file mode 100644 index ed7e55916..000000000 Binary files a/hr_employee_transfer/static/description/create_a_transfer.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/create_contract.png b/hr_employee_transfer/static/description/create_contract.png deleted file mode 100644 index 84717bcd2..000000000 Binary files a/hr_employee_transfer/static/description/create_contract.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/cybro-service.png b/hr_employee_transfer/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_employee_transfer/static/description/cybro-service.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/cybro_logo.png b/hr_employee_transfer/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_employee_transfer/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/icon.png b/hr_employee_transfer/static/description/icon.png deleted file mode 100644 index 7fec29119..000000000 Binary files a/hr_employee_transfer/static/description/icon.png and /dev/null differ diff --git a/hr_employee_transfer/static/description/index.html b/hr_employee_transfer/static/description/index.html deleted file mode 100644 index cf3a4edf3..000000000 --- a/hr_employee_transfer/static/description/index.html +++ /dev/null @@ -1,103 +0,0 @@ - -
-
-

Open HRMS

-

Most advanced open source HR management software

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

Branch Transfer

-

Employee transfer between branches

-

Cybrosys Technologies

-
-
-

Features:

-
- Transfer Employee between branches.
-
-
-
- -
-
-
-

Overview

-

- Transferring employees between company is a basic thing in a organization. Now Odoo lacks a provision for employee transfer. This module gives a basic structure for employee transfer -

-
-
-
- -
-
-

Employee Transfer

-
-

- ☛ Create a Employee Transfer.
- ☛ Select the Transfer Company.
- ☛ Click on the sent button.
-

-
- -
-
-
-
- -
-
-

Contract

-
-

- ☛ Create new contract.
-

-

- -
-
-
-
- -
-
-

Our Odoo Services

- - -
- -
- - - -
-

Need Any Help?

- -
- diff --git a/hr_employee_transfer/views/employee_transfer.xml b/hr_employee_transfer/views/employee_transfer.xml deleted file mode 100644 index a255eb507..000000000 --- a/hr_employee_transfer/views/employee_transfer.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - Employee Transfer - employee.transfer - -
-
-
- -
-

- -

-
- - - - - - - - - - - - - - - - -
-
-
-
- - Employee Transfer Tree - employee.transfer - - - - - - - - - - - - - - - Employee Transfer - ir.actions.act_window - employee.transfer - form - tree,form - - [] - -

- Click to create a new Transfer. -

- Use this menu to browse previous transfer. To record new - transfer, you may use the create button. -

-
-
- - -
diff --git a/hr_employee_updation/README.md b/hr_employee_updation/README.md deleted file mode 100644 index 93877f956..000000000 --- a/hr_employee_updation/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Open HRMS Employee Info ------------------------ -Supporting Addon for Open HRMS, Added Advanced Fields On Employee Master. - -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_employee_updation/__init__.py b/hr_employee_updation/__init__.py deleted file mode 100644 index b579ce91c..000000000 --- a/hr_employee_updation/__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_employee_updation/__manifest__.py b/hr_employee_updation/__manifest__.py deleted file mode 100644 index 6181591f9..000000000 --- a/hr_employee_updation/__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 Employee Info', - 'version': '10.0.1.1.0', - 'summary': """Adding Advanced Fields In Employee Master""", - 'description': 'This module helps you to add more information in employee records.', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr', 'mail', 'hr_gamification'], - 'data': [ - 'security/ir.model.access.csv', - 'views/hr_employee_view.xml', - 'views/hr_notification.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_employee_updation/doc/RELEASE_NOTES.md b/hr_employee_updation/doc/RELEASE_NOTES.md deleted file mode 100644 index 3fceaa8fc..000000000 --- a/hr_employee_updation/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 07.04.2018 -#### Version 10.0.1.1.0 -##### CHG -- Index updated. - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/hr_employee_updation/models/__init__.py b/hr_employee_updation/models/__init__.py deleted file mode 100644 index 01c1233ae..000000000 --- a/hr_employee_updation/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 hr_employee - - - - diff --git a/hr_employee_updation/models/hr_employee.py b/hr_employee_updation/models/hr_employee.py deleted file mode 100644 index 3bfb66702..000000000 --- a/hr_employee_updation/models/hr_employee.py +++ /dev/null @@ -1,107 +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, timedelta -from odoo import models, fields, _ - -GENDER_SELECTION = [('male', 'Male'), - ('female', 'Female'), - ('other', 'Other')] - - -class HrEmployeeContractName(models.Model): - """This class is to add emergency contact table""" - _name = 'hr.emergency.contact' - _description = 'HR Emergency Contact' - - number = fields.Char(string='Number', help='Contact Number') - relation = fields.Char(string='Contact', help='Relation with employee') - employee_obj = fields.Many2one('hr.employee', invisible=1) - - -class HrEmployeeFamilyInfo(models.Model): - """Table for keep employee family information""" - _name = 'hr.employee.family' - _description = 'HR Employee Family' - - member_name = fields.Char(string='Name', related='employee_ref.name', store=True) - employee_ref = fields.Many2one(string="Is Employee", - help='If family member currently is an employee of same company, ' - 'then please tick this field', - comodel_name='hr.employee') - employee_id = fields.Many2one(string="Employee", help='Select corresponding Employee', comodel_name='hr.employee', - invisible=1) - relation = fields.Selection([('father', 'Father'), - ('mother', 'Mother'), - ('daughter', 'Daughter'), - ('son', 'Son'), - ('wife', 'Wife')], string='Relationship', help='Relation with employee') - member_contact = fields.Char(string='Contact No', related='employee_ref.personal_mobile', store=True) - - -class HrEmployee(models.Model): - _inherit = 'hr.employee' - - def mail_reminder(self): - now = datetime.now() + timedelta(days=1) - date_now = now.date() - match = self.search([]) - for i in match: - if i.id_expiry_date: - exp_date = fields.Date.from_string(i.id_expiry_date) - timedelta(days=14) - if date_now >= exp_date: - mail_content = " Hello " + i.name + ",
Your ID " + i.identification_id + "is going to expire on " + \ - str(i.id_expiry_date) + ". Please renew it before expiry date" - main_content = { - 'subject': _('ID-%s Expired On %s') % (i.identification_id, i.id_expiry_date), - 'author_id': self.env.user.partner_id.id, - 'body_html': mail_content, - 'email_to': i.work_email, - } - self.env['mail.mail'].create(main_content).send() - match1 = self.search([]) - for i in match1: - if i.passport_expiry_date: - exp_date1 = fields.Date.from_string(i.passport_expiry_date) - timedelta(days=180) - if date_now >= exp_date1: - mail_content = " Hello " + i.name + ",
Your Passport " + i.passport_id + "is going to expire on " + \ - str(i.passport_expiry_date) + ". Please renew it before expiry date" - main_content = { - 'subject': _('Passport-%s Expired On %s') % (i.passport_id, i.passport_expiry_date), - 'author_id': self.env.user.partner_id.id, - 'body_html': mail_content, - 'email_to': i.work_email, - } - self.env['mail.mail'].create(main_content).send() - personal_mobile = fields.Char(string='Mobile', related='address_home_id.mobile', store=True) - emergency_contact = fields.One2many('hr.emergency.contact', 'employee_obj', string='Emergency Contact') - joining_date = fields.Date(string='Joining Date') - id_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Identification ID') - passport_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Passport ID') - id_attachment_id = fields.Many2many('ir.attachment', 'id_attachment_rel', 'id_ref', 'attach_ref', - string="Attachment", help='You can attach the copy of your Id') - passport_attachment_id = fields.Many2many('ir.attachment', 'passport_attachment_rel', 'passport_ref', 'attach_ref1', - string="Attachment", - help='You can attach the copy of Passport') - fam_ids = fields.One2many('hr.employee.family', 'employee_id', string='Family', help='Family Information') - - diff --git a/hr_employee_updation/security/ir.model.access.csv b/hr_employee_updation/security/ir.model.access.csv deleted file mode 100644 index c17dd7d95..000000000 --- a/hr_employee_updation/security/ir.model.access.csv +++ /dev/null @@ -1,7 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_employee_family_employee","hr.employee.family_employee","model_hr_employee_family","base.group_user",1,0,0,0 -"access_hr_employee_family_manager","hr.employee.family_manager","model_hr_employee_family","hr.group_hr_manager",1,1,1,1 -"access_hr_employee_family_user","hr.employee.family_user","model_hr_employee_family","hr.group_hr_user",1,1,1,1 -"access_hr_employee_emergency_contact","hr.emergency.contact","model_hr_emergency_contact","base.group_user",1,0,0,0 -"access_hr_employee_emergency_contact_manager","hr.emergency.contact","model_hr_emergency_contact","hr.group_hr_manager",1,1,1,1 -"access_hr_employee_emergency_contact_user","hr.emergency.contact","model_hr_emergency_contact","hr.group_hr_user",1,1,1,1 \ No newline at end of file diff --git a/hr_employee_updation/static/description/HRMS-BUTTON.png b/hr_employee_updation/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_employee_updation/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_employee_updation/static/description/banner.jpg b/hr_employee_updation/static/description/banner.jpg deleted file mode 100644 index 663c0a0a9..000000000 Binary files a/hr_employee_updation/static/description/banner.jpg and /dev/null differ diff --git a/hr_employee_updation/static/description/cybro-service.png b/hr_employee_updation/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_employee_updation/static/description/cybro-service.png and /dev/null differ diff --git a/hr_employee_updation/static/description/cybro_logo.png b/hr_employee_updation/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_employee_updation/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_employee_updation/static/description/emergency_contact.png b/hr_employee_updation/static/description/emergency_contact.png deleted file mode 100644 index 2fd7ba18e..000000000 Binary files a/hr_employee_updation/static/description/emergency_contact.png and /dev/null differ diff --git a/hr_employee_updation/static/description/family_info.png b/hr_employee_updation/static/description/family_info.png deleted file mode 100644 index b3d3fbb65..000000000 Binary files a/hr_employee_updation/static/description/family_info.png and /dev/null differ diff --git a/hr_employee_updation/static/description/icon.png b/hr_employee_updation/static/description/icon.png deleted file mode 100644 index cc02f7a68..000000000 Binary files a/hr_employee_updation/static/description/icon.png and /dev/null differ diff --git a/hr_employee_updation/static/description/index.html b/hr_employee_updation/static/description/index.html deleted file mode 100644 index 293c0a13e..000000000 --- a/hr_employee_updation/static/description/index.html +++ /dev/null @@ -1,127 +0,0 @@ -
-
-

Open HRMS

-

Most advanced open source HR management software

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

Open HRMS Employee Info

-

Added Advance Fields On Employee Master

-

Cybrosys Technologies

-
-
-

Features:

-
- Added family information.
- Added joining date and contact info.
- Added passport and id expiry date and attachments.
- Added expiry notification for passport and id documents.
-
-
-
- -
-
-
-

Overview

-

- This module added some advanced features on Employee master. - Such as family info, joining date, passport and Id expiry date. - This module also sends expiry notification for passport and id to corresponding employees. -

-
-
-
- -
-
-

Identification ID & Passport ID

-
-
- -
-
-
-
- -
-
-

Emergency Contact Number

-
-
- -
-
-
-
- -
-
-

Family Information

-
-
- -
-
-
-
- -
-
-

Joining Date

-
-
- -
-
-
-
- -
-
-

Our Odoo Services

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

Need Any Help?

- -
- - diff --git a/hr_employee_updation/static/description/joining_date.png b/hr_employee_updation/static/description/joining_date.png deleted file mode 100644 index e1575e52f..000000000 Binary files a/hr_employee_updation/static/description/joining_date.png and /dev/null differ diff --git a/hr_employee_updation/static/description/personal_info.png b/hr_employee_updation/static/description/personal_info.png deleted file mode 100644 index 3c9901c4b..000000000 Binary files a/hr_employee_updation/static/description/personal_info.png and /dev/null differ diff --git a/hr_employee_updation/views/hr_employee_view.xml b/hr_employee_updation/views/hr_employee_view.xml deleted file mode 100644 index 6e347a137..000000000 --- a/hr_employee_updation/views/hr_employee_view.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - hr.employee.form.view - hr.employee - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hr.employee.view.form.inherit - hr.employee - - - - -
- -
- -
-
-
-
-
-
\ No newline at end of file diff --git a/hr_employee_updation/views/hr_notification.xml b/hr_employee_updation/views/hr_notification.xml deleted file mode 100644 index 91ea067a6..000000000 --- a/hr_employee_updation/views/hr_notification.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - HR Employee Data Expiration - 1 - days - -1 - - - - - - - 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 1d80f982a..000000000 --- a/hr_insurance/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module hr_insurance - -#### 30.03.2018 -#### Version 10.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 5dc94fbc4..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 Management', - 'version': '10.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/employee_insurance.py b/hr_insurance/models/employee_insurance.py deleted file mode 100644 index bd6cf5d58..000000000 --- a/hr_insurance/models/employee_insurance.py +++ /dev/null @@ -1,121 +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') - print x - print current_datetime - print y - 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'] - emp_id = contract_obj.browse(contract_ids[0]).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/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/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 0a648278c..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/RELEASE_NOTES.md b/hr_leave_request_aliasing/RELEASE_NOTES.md deleted file mode 100644 index 406ed1b41..000000000 --- a/hr_leave_request_aliasing/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_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 5ec63469a..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': '10.0.1.1.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 9005d58cc..000000000 --- a/hr_leave_request_aliasing/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 07.04.2018 -#### Version 10.0.1.1.0 -##### CHG -- Index updated - -#### 30.03.2018 -#### Version 10.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/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/res_config.py b/hr_leave_request_aliasing/models/res_config.py deleted file mode 100644 index b01f49a7a..000000000 --- a/hr_leave_request_aliasing/models/res_config.py +++ /dev/null @@ -1,43 +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): - _name = 'hr.leave.config.settings' - _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")) - - @api.model - def get_default_alias_prefix(self, fields): - alias_name = self.env.ref('hr_leave_request_aliasing.mail_alias_leave').alias_name - return {'alias_prefix': alias_name} - - @api.multi - def set_default_alias_prefix(self): - for record in self: - self.env.ref('hr_leave_request_aliasing.mail_alias_leave').write({'alias_name': record.alias_prefix}) - 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/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 4faef8c08..000000000 --- a/hr_leave_request_aliasing/static/description/index.html +++ /dev/null @@ -1,94 +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 0ad909589..000000000 --- a/hr_leave_request_aliasing/views/res_config_views.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Configure Leave - hr.leave.config.settings - - -
-
-
- - -
-
-
- - - Configure Leave - hr.leave.config.settings - form - inline - - - -
-
diff --git a/hr_multi_company/README.md b/hr_multi_company/README.md deleted file mode 100644 index 92115909a..000000000 --- a/hr_multi_company/README.md +++ /dev/null @@ -1,17 +0,0 @@ -OHRMS Multi Company ---------------------- -Supporting Addon for Open HRMS, Added Advance Fields On Employee Master - -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_multi_company/__init__.py b/hr_multi_company/__init__.py deleted file mode 100644 index 9c6d6e056..000000000 --- a/hr_multi_company/__init__.py +++ /dev/null @@ -1,25 +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 . -# -################################################################################### -from . import models - - diff --git a/hr_multi_company/__manifest__.py b/hr_multi_company/__manifest__.py deleted file mode 100644 index 877db055e..000000000 --- a/hr_multi_company/__manifest__.py +++ /dev/null @@ -1,43 +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 Multi-Company', - 'version': '10.0.1.1.0', - 'summary': """Enables Multi-Company""", - 'description': 'This module enables multi company features', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr_contract', 'hr_payroll', 'hr_attendance', 'hr_employee_transfer'], - 'data': [ - 'views/hr_company_view.xml', - 'views/multi_company_view.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/hr_multi_company/doc/RELEASE_NOTES.md b/hr_multi_company/doc/RELEASE_NOTES.md deleted file mode 100644 index 29f2bd9f2..000000000 --- a/hr_multi_company/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 09.04.2018 -#### Version 10.0.1.1.0 -##### CHG -- Index updated. - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/hr_multi_company/models/__init__.py b/hr_multi_company/models/__init__.py deleted file mode 100644 index 0e2cb3558..000000000 --- a/hr_multi_company/models/__init__.py +++ /dev/null @@ -1,24 +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 . -# -################################################################################### -from . import hr_multi_company - diff --git a/hr_multi_company/models/hr_multi_company.py b/hr_multi_company/models/hr_multi_company.py deleted file mode 100644 index 2f30de346..000000000 --- a/hr_multi_company/models/hr_multi_company.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: 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 - - -class HrAttendanceMultiCompany(models.Model): - _inherit = 'hr.attendance' - - company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, - default=lambda self: self.env.user.company_id) - - -class HrLeaveMultiCompany(models.Model): - _inherit = 'hr.holidays' - - company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, - default=lambda self: self.env.user.company_id) - - -class HrPayslipMultiCompany(models.Model): - _inherit = 'hr.payslip.run' - - company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, - default=lambda self: self.env.user.company_id) - - -class HrSalaryCategoryMultiCompany(models.Model): - _inherit = 'hr.salary.rule.category' - - company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, - default=lambda self: self.env.user.company_id) diff --git a/hr_multi_company/static/description/HRMS-BUTTON.png b/hr_multi_company/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/hr_multi_company/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/hr_multi_company/static/description/banner.jpg b/hr_multi_company/static/description/banner.jpg deleted file mode 100644 index a53eab0ca..000000000 Binary files a/hr_multi_company/static/description/banner.jpg and /dev/null differ diff --git a/hr_multi_company/static/description/cybro-service.png b/hr_multi_company/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/hr_multi_company/static/description/cybro-service.png and /dev/null differ diff --git a/hr_multi_company/static/description/cybro_logo.png b/hr_multi_company/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/hr_multi_company/static/description/cybro_logo.png and /dev/null differ diff --git a/hr_multi_company/static/description/icon.png b/hr_multi_company/static/description/icon.png deleted file mode 100644 index 1dbe70d04..000000000 Binary files a/hr_multi_company/static/description/icon.png and /dev/null differ diff --git a/hr_multi_company/static/description/index.html b/hr_multi_company/static/description/index.html deleted file mode 100644 index 1b9ddda35..000000000 --- a/hr_multi_company/static/description/index.html +++ /dev/null @@ -1,99 +0,0 @@ -
-
-

Open HRMS

-

Most advanced open source HR management software

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

Open HRMS Multi Company

-

Managing Multi Company In HR Processes

-

Cybrosys Technologies

-
-
-

Features:

-
- Managing multi company.
-
-
-
- -
-
-
-

Overview

-

- This module enables hr multi company, hence hr manager can easily handle - multi company process separately. We can activate multi company feature in general settings as usual. - This will automatically add company field in every hr related records. -

-
-
-
- -
-
-

Multi Company In Leaves

-
-
- -
-
-
-
- -
-
-

Multi Company In Attendance

-
-
- -
-
-
-
- -
-
-

Our Odoo Services

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

Need Any Help?

- -
diff --git a/hr_multi_company/static/description/multi_company.png b/hr_multi_company/static/description/multi_company.png deleted file mode 100644 index 34ad6464b..000000000 Binary files a/hr_multi_company/static/description/multi_company.png and /dev/null differ diff --git a/hr_multi_company/static/description/oh_attendance.png b/hr_multi_company/static/description/oh_attendance.png deleted file mode 100644 index ef8539c53..000000000 Binary files a/hr_multi_company/static/description/oh_attendance.png and /dev/null differ diff --git a/hr_multi_company/views/hr_company_view.xml b/hr_multi_company/views/hr_company_view.xml deleted file mode 100644 index b4dde2cfe..000000000 --- a/hr_multi_company/views/hr_company_view.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - hr.holidays.form.view1 - hr.holidays - - - - - - - - - - hr.contract.form.view1 - hr.contract - - - - - - - - - - hr.attendance.form.view1 - hr.attendance - - - - - - - - - - hr.payslip.run.form.view1 - hr.payslip.run - - - - - - - - - - hr.salary.rule.category.form.view1 - hr.salary.rule.category - - - - - - - - \ No newline at end of file diff --git a/hr_multi_company/views/multi_company_view.xml b/hr_multi_company/views/multi_company_view.xml deleted file mode 100644 index cd819e0e0..000000000 --- a/hr_multi_company/views/multi_company_view.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - Department Create, Write, Unlink - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Salary rules of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Salary structures of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Payslips batches of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Payslips of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Salary Category of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Payslips Contribution of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Attendance of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Holidays of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Expense of my Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - \ No newline at end of file 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 8870ead65..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': '10.0.2.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/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/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/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/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/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/Screenshot from 2018-03-30 18-31-42.png b/hr_reminder/static/description/Screenshot from 2018-03-30 18-31-42.png deleted file mode 100644 index b052c15e5..000000000 Binary files a/hr_reminder/static/description/Screenshot from 2018-03-30 18-31-42.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 f6eb3d608..000000000 --- a/hr_reminder/static/description/index.html +++ /dev/null @@ -1,137 +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 4ad643b56..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 44350466a..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 ce468e0bc..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 f40020454..000000000 --- a/hr_reminder/static/src/css/notification.css +++ /dev/null @@ -1,31 +0,0 @@ - -.oe_webclient_notification_action t { - color: white; -} -.oe_webclient_notification_action p { - color: white; - margin-top: 1em; -} - .label { - display: inline-block; - color: black; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} -.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 28d5e9c83..000000000 --- a/hr_reminder/static/src/js/reminder_topbar.js +++ /dev/null @@ -1,82 +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: 'tree', - view_type: 'tree', - domain: [[date, '=', new Date()]], - views: [[false, 'tree']], - target: 'new',}) - } - - else if (self.reminder[i+2] == 'set_date'){ - return self.do_action({ - type: 'ir.actions.act_window', - res_model: model, - view_mode: 'tree', - view_type: 'tree', - domain: [[date, '=', self.reminder[i+3]]], - views: [[false, 'tree']], - target: 'new',}) - } - - else if (self.reminder[i+2] == 'set_period'){ - return self.do_action({ - type: 'ir.actions.act_window', - res_model: model, - view_mode: 'tree', - view_type: 'tree', - domain: [[date, '<', self.reminder[i+5]],[date, '>', self.reminder[i+4]]], - views: [[false, 'tree']], - 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 5660a2945..000000000 --- a/hr_reminder/views/hr_reminder_view.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - 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_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 e9f8c63c9..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': '10.0.1.1.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 8de2a9fb0..000000000 --- a/hr_reward_warning/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 07.04.2018 -#### Version 10.0.1.1.0 -##### CHG -- Index updated - -#### 30.03.2018 -#### Version 10.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 1574a2916..000000000 --- a/hr_reward_warning/models/hr_employee.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 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([('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([('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 5b377fd6f..000000000 --- a/hr_reward_warning/models/hr_warning.py +++ /dev/null @@ -1,65 +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', 'ir.needaction_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,) - 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): - 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 a3b1e2416..000000000 --- a/hr_reward_warning/views/hr_announcement_view.xml +++ /dev/null @@ -1,132 +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/RELEASE_NOTES.md b/hr_vacation_mngmt/RELEASE_NOTES.md deleted file mode 100644 index 1a18ce542..000000000 --- a/hr_vacation_mngmt/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/__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 f8f375c16..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': '10.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 e30e4d710..000000000 --- a/hr_vacation_mngmt/data/hr_vacation_data.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Flight ticket status update - 1 - days - -1 - - - - () - - - - Approved Leaves - hr.holidays - [('state', '=', 'validate')] - - - - - HR Leave Reminder - - False - ir.actions.server - code - -mail_template = env.ref('hr_vacation_mngmt.email_template_hr_leave_reminder_mail') -holiday_managers = env.ref('hr_holidays.group_hr_holidays_manager').users -for manager in holiday_managers: - template = mail_template.sudo().with_context( - email_to = manager.email, - ) - template.send_mail(record.id, force_send=True) - - - - - HR Leave Reminder - - 1 - on_time - - - -5 - day - - - - - Airlines - True - - - \ No newline at end of file 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 18007ff65..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.values'].get_default('hr.flight.ticket', '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 1f8cdfdee..000000000 --- a/hr_vacation_mngmt/models/hr_payslip.py +++ /dev/null @@ -1,185 +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) - if category.code in localdict['categories'].dict: - amount += localdict['categories'].dict[category.code] - localdict['categories'].dict[category.code] = 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 [value for code, value in result_dict.items()] - - -class HrPayrollConfigSettings(models.TransientModel): - _inherit = 'hr.payroll.config.settings' - - default_leave_salary = fields.Selection([('0', 'Basic'), ('1', 'Gross')], string='Leave Salary') - - @api.model - def get_default_leave_salary(self, fields): - default_leave_salary = self.env['ir.config_parameter'].sudo().get_param('default_leave_salary') - return { - 'default_leave_salary': default_leave_salary - } - - @api.multi - def set_default_leave_salary(self): - config = self.env['ir.config_parameter'].sudo() - config.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 a85f52353..000000000 --- a/hr_vacation_mngmt/models/hr_vacation.py +++ /dev/null @@ -1,151 +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, - } - - -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 = 'hr.leave.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') - - @api.model - def get_default_leave_details(self, fields): - leave_reminder = self.env.ref('hr_vacation_mngmt.hr_email_leave_reminder').condition - reminder_day_before = self.env.ref('hr_vacation_mngmt.rule_hr_leave_reminder_email').trg_date_range - default_expense_account = self.env['ir.values'].get_default('hr.flight.ticket', 'expense_account') - return { - 'leave_reminder': leave_reminder, - 'reminder_day_before': reminder_day_before, - 'default_expense_account': default_expense_account, - } - - @api.multi - def set_default_leave_details(self): - for record in self: - self.env.ref('hr_vacation_mngmt.hr_email_leave_reminder').write({'condition': record.leave_reminder}) - self.env.ref('hr_vacation_mngmt.rule_hr_leave_reminder_email').write({'trg_date_range': record.reminder_day_before}) - self.env['ir.values'].sudo().set_default('hr.flight.ticket', '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 1f098554d..000000000 --- a/hr_vacation_mngmt/static/description/index.html +++ /dev/null @@ -1,210 +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 3a458b5dd..000000000 --- a/hr_vacation_mngmt/views/hr_payslip.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - hr.payslip.form - hr.payslip - - - - - - - - - - Configure Payroll - hr.payroll.config.settings - - - - - - - - - \ 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 6aa01cff0..000000000 --- a/hr_vacation_mngmt/views/hr_vacation.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Leave Request - hr.holidays - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - pending.task.form - pending.task - -
    - - - - - - - - - - - - - - - -
    -
    -
    - - - Configure Leave - hr.leave.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/oh_appraisal/README.rst b/oh_appraisal/README.rst deleted file mode 100644 index 5c119f2c2..000000000 --- a/oh_appraisal/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -OHRMS Employee Appraisal v10 -============================ - -Roll out appraisal plans and get the best of your workforce - -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 (AGPLv3) -(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/oh_appraisal/RELEASE_NOTES.md b/oh_appraisal/RELEASE_NOTES.md deleted file mode 100644 index fb68f61a8..000000000 --- a/oh_appraisal/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module oh_appraisal - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/oh_appraisal/__init__.py b/oh_appraisal/__init__.py deleted file mode 100644 index 7cacd9c23..000000000 --- a/oh_appraisal/__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/oh_appraisal/__manifest__.py b/oh_appraisal/__manifest__.py deleted file mode 100644 index e5f629ce0..000000000 --- a/oh_appraisal/__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: 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 Appraisal", - 'version': '10.0.1.2.0', - 'summary': """Roll out appraisal plans and get the best of your workforce""", - 'description': """Roll out appraisal plans and get the best of your workforce""", - 'category': 'Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['hr', 'survey'], - 'data': [ - 'security/ir.model.access.csv', - 'security/hr_appraisal_security.xml', - 'views/hr_appraisal_survey_views.xml', - 'views/hr_appraisal_form_view.xml', - 'data/hr_appraisal_stages.xml' - ], - 'images': ["static/description/banner.jpg"], - 'license': "AGPL-3", - 'installable': True, - 'application': False, -} diff --git a/oh_appraisal/data/hr_appraisal_stages.xml b/oh_appraisal/data/hr_appraisal_stages.xml deleted file mode 100644 index c5a986e30..000000000 --- a/oh_appraisal/data/hr_appraisal_stages.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - To Start - 1 - - - - Sent Mail - 2 - - - - Done - 3 - - - - Cancel - 4 - - - diff --git a/oh_appraisal/models/__init__.py b/oh_appraisal/models/__init__.py deleted file mode 100644 index 9f5c4f07f..000000000 --- a/oh_appraisal/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_appraisal_survey, hr_appraisal_form diff --git a/oh_appraisal/models/hr_appraisal_form.py b/oh_appraisal/models/hr_appraisal_form.py deleted file mode 100644 index 23d10fbc1..000000000 --- a/oh_appraisal/models/hr_appraisal_form.py +++ /dev/null @@ -1,192 +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, api, SUPERUSER_ID - - -class HrAppraisalForm(models.Model): - _name = 'hr.appraisal' - _inherit = 'mail.thread' - _rec_name = 'emp_id' - _description = 'Appraisal' - - @api.model - def _read_group_stage_ids(self, categories, domain, order): - """ Read all the stages and display it in the kanban view, even if it is empty.""" - category_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID) - return categories.browse(category_ids) - - def _default_stage_id(self): - """Setting default stage""" - rec = self.env['hr.appraisal.stages'].search([], limit=1, order='sequence ASC') - return rec.id if rec else None - - emp_id = fields.Many2one('hr.employee', string="Employee", required=True) - appraisal_deadline = fields.Date(string="Appraisal Deadline", required=True) - final_interview = fields.Date(string="Final Interview") - company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.user.company_id) - hr_manager = fields.Boolean(string="Manager", default=False) - hr_emp = fields.Boolean(string="Employee", default=False) - hr_colloborator = fields.Boolean(string="Collaborators", default=False) - hr_colleague = fields.Boolean(string="Colleague", default=False) - hr_manager_id = fields.Many2many('hr.employee', 'manager_appraisal_rel', string="Select Appraisal Reviewer") - hr_colleague_id = fields.Many2many('hr.employee', 'colleagues_appraisal_rel', - string="Select Appraisal Reviewer") - hr_colloborator_id = fields.Many2many('hr.employee', 'colloborators_appraisal_rel', - string="Select Appraisal Reviewer") - manager_survey_id = fields.Many2one('survey.survey', string="Select Opinion Form") - emp_survey_id = fields.Many2one('survey.survey', string="Select Appraisal Form") - colloborator_survey_id = fields.Many2one('survey.survey', string="Select Opinion Form") - colleague_survey_id = fields.Many2one('survey.survey', string="Select Opinion Form") - response_id = fields.Many2one('survey.user_input', "Response", ondelete="set null", oldname="response") - final_evaluation = fields.Text(string="Final Evaluation") - app_period_from = fields.Date("From", required=True, readonly=True, default=fields.Datetime.now()) - tot_comp_survey = fields.Integer(string="Count Answers", compute="_compute_completed_survey") - tot_sent_survey = fields.Integer(string="Count Sent Questions") - created_by = fields.Many2one('res.users', string="Created By", default=lambda self: self.env.uid) - state = fields.Many2one('hr.appraisal.stages', string='Stage', track_visibility='onchange', index=True, - default=lambda self: self._default_stage_id(), - group_expand='_read_group_stage_ids') - # for coloring the kanban box - color = fields.Integer(string="Color Index") - check_sent = fields.Boolean(string="Check Sent Mail", default=False, copy=False) - check_draft = fields.Boolean(string="Check Draft", default=True, copy=False) - check_cancel = fields.Boolean(string="Check Cancel", default=False, copy=False) - check_done = fields.Boolean(string="Check Done", default=False, copy=False) - - @api.multi - def action_done(self): - rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 3)]) - self.state = rec.id - self.check_done = True - self.check_draft = False - - @api.multi - def action_set_draft(self): - rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 1)]) - self.state = rec.id - self.check_draft = True - self.check_sent = False - - @api.multi - def action_cancel(self): - rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 4)]) - self.state = rec.id - self.check_cancel = True - self.check_draft = False - - @api.multi - def fetch_appraisal_reviewer(self): - appraisal_reviewers = [] - if self.hr_manager and self.hr_manager_id and self.manager_survey_id: - appraisal_reviewers.append((self.hr_manager_id, self.manager_survey_id)) - if self.hr_emp and self.emp_survey_id: - appraisal_reviewers.append((self.emp_id, self.emp_survey_id)) - if self.hr_colloborator and self.hr_colloborator_id and self.colloborator_survey_id: - appraisal_reviewers.append((self.hr_colloborator_id, self.colloborator_survey_id)) - if self.hr_colleague and self.hr_colleague_id and self.colleague_survey_id: - appraisal_reviewers.append((self.hr_colleague_id, self.colleague_survey_id)) - return appraisal_reviewers - - @api.multi - def action_start_appraisal(self): - """ This function will start the appraisal by sending emails to the corresponding employees - specified in the appraisal""" - send_count = 0 - appraisal_reviewers_list = self.fetch_appraisal_reviewer() - for appraisal_reviewers, survey_id in appraisal_reviewers_list: - for reviewers in appraisal_reviewers: - url = survey_id.public_url - response = self.env['survey.user_input'].create( - {'survey_id': survey_id.id, 'partner_id': reviewers.user_id.partner_id.id, - 'appraisal_id': self.ids[0], 'deadline': self.appraisal_deadline, 'email': reviewers.user_id.email}) - token = response.token - if token: - url = url + '/' + token - mail_content = "Dear " + reviewers.name + "," + "
    Please fill out the following survey " \ - "related to " + self.emp_id.name + "
    Click here to access the survey.
    " + \ - str(url) + "
    Post your response for the appraisal till : " + str(self.appraisal_deadline) - values = {'model': 'hr.appraisal', - 'res_id': self.ids[0], - 'subject': survey_id.title, - 'body_html': mail_content, - 'parent_id': None, - 'email_from': self.env.user.email or None, - 'auto_delete': True, - } - values['email_to'] = reviewers.work_email - result = self.env['mail.mail'].create(values).send() - if result is True: - send_count += 1 - self.write({'tot_sent_survey': send_count}) - rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 2)]) - self.state = rec.id - self.check_sent = True - self.check_draft = False - - if self.hr_emp and self.emp_survey_id: - self.ensure_one() - if not self.response_id: - response = self.env['survey.user_input'].create( - {'survey_id': self.emp_survey_id.id, 'partner_id': self.emp_id.user_id.partner_id.id, - 'appraisal_id': self.ids[0], 'deadline': self.appraisal_deadline, 'email': reviewers.user_id.email}) - self.response_id = response.id - else: - response = self.response_id - return self.emp_survey_id.with_context(survey_token=response.token).action_start_survey() - - @api.multi - def action_get_answers(self): - """ This function will return all the answers posted related to this appraisal.""" - - tree_res = self.env['ir.model.data'].get_object_reference('survey', 'survey_user_input_tree') - tree_id = tree_res and tree_res[1] or False - form_res = self.env['ir.model.data'].get_object_reference('survey', 'survey_user_input_form') - form_id = form_res and form_res[1] or False - return { - 'model': 'ir.actions.act_window', - 'name': 'Answers', - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form,tree', - 'res_model': 'survey.user_input', - 'views': [(tree_id, 'tree'), (form_id, 'form')], - 'domain': [('state', '=', 'done'), ('appraisal_id', '=', self.ids[0])], - - } - - @api.one - def _compute_completed_survey(self): - - answers = self.env['survey.user_input'].search([('state', '=', 'done'), ('appraisal_id', '=', self.ids[0])]) - self.tot_comp_survey = len(answers) - - -class AppraisalStages(models.Model): - _name = 'hr.appraisal.stages' - _description = 'Appraisal Stages' - - name = fields.Char(string="Name") - sequence = fields.Integer(string="Sequence") - fold = fields.Boolean(string='Folded in Appraisal Pipeline', - help='This stage is folded in the kanban view when ' - 'there are no records in that stage to display.') diff --git a/oh_appraisal/models/hr_appraisal_survey.py b/oh_appraisal/models/hr_appraisal_survey.py deleted file mode 100644 index a5a4adb74..000000000 --- a/oh_appraisal/models/hr_appraisal_survey.py +++ /dev/null @@ -1,29 +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 SurveyInput(models.Model): - _inherit = 'survey.user_input' - - appraisal_id = fields.Many2one('hr.appraisal', string="Appriasal id") diff --git a/oh_appraisal/security/hr_appraisal_security.xml b/oh_appraisal/security/hr_appraisal_security.xml deleted file mode 100644 index 5f2121589..000000000 --- a/oh_appraisal/security/hr_appraisal_security.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - Hr Appraisal Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Appraisal - Helps to evaluate employees... - 3 - - - - Employee - - - - - - Manager - - - - - - - Appraisal Forms - [('created_by','=',user.id)] - - - - - - - - - - - Appraisal Forms - - - - - - - - - - - [('partner_id', '=', user.partner_id.id)] - - - diff --git a/oh_appraisal/security/ir.model.access.csv b/oh_appraisal/security/ir.model.access.csv deleted file mode 100644 index 1b64fc76c..000000000 --- a/oh_appraisal/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_appraisal_hr_appraisal,oh_appraisal.hr_appraisal,model_hr_appraisal,,1,1,1,1 -access_hr_appraisal_hr_appraisal1,oh_appraisal.hr_appraisal_stages,model_hr_appraisal_stages,,1,1,1,1 diff --git a/oh_appraisal/static/description/HRMS-BUTTON.png b/oh_appraisal/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/oh_appraisal/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/oh_appraisal/static/description/appraisal.png b/oh_appraisal/static/description/appraisal.png deleted file mode 100644 index 7a7f0a995..000000000 Binary files a/oh_appraisal/static/description/appraisal.png and /dev/null differ diff --git a/oh_appraisal/static/description/banner.jpg b/oh_appraisal/static/description/banner.jpg deleted file mode 100644 index 0823d44d3..000000000 Binary files a/oh_appraisal/static/description/banner.jpg and /dev/null differ diff --git a/oh_appraisal/static/description/cybro-service.png b/oh_appraisal/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/oh_appraisal/static/description/cybro-service.png and /dev/null differ diff --git a/oh_appraisal/static/description/cybro_logo.png b/oh_appraisal/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/oh_appraisal/static/description/cybro_logo.png and /dev/null differ diff --git a/oh_appraisal/static/description/email.png b/oh_appraisal/static/description/email.png deleted file mode 100644 index ba236b416..000000000 Binary files a/oh_appraisal/static/description/email.png and /dev/null differ diff --git a/oh_appraisal/static/description/icon.png b/oh_appraisal/static/description/icon.png deleted file mode 100644 index b4f716e94..000000000 Binary files a/oh_appraisal/static/description/icon.png and /dev/null differ diff --git a/oh_appraisal/static/description/index.html b/oh_appraisal/static/description/index.html deleted file mode 100644 index 36028ee8d..000000000 --- a/oh_appraisal/static/description/index.html +++ /dev/null @@ -1,145 +0,0 @@ -
    -
    -

    OpenHRMS

    -

    Most advanced open source HR management software

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

    Employee Appraisal

    -

    Roll out appraisal plans and get the best of your workforce.

    -

    Cybrosys Technologies

    -
    -
    -

    Major Features:

    -
      -
    •   Create appraisal plans using interviews, questionnaires and feedback forms.
    • -
    •    Multiple appraisal methods like self-appraisal, colleague evaluation
    • -
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    - Employee appraisal module is a component of Open HRMS suit, - it helps you to utilize the best of your human resource pool. - Implement appraisal strategies to keep the motivational and performance level - of your employees high. Appraisal module allows you to create Top Down or Bottom-up - evaluation plans and give timely feedbacks and complements for accomplishments. - -

    -
    -
    -
    - -
    -
    -

    Appraisal Menu

    -
    -
    - -
    -
    -
    -

    - Create a form for evaluating employee.Option to create Top Down or Bottom-up evaluation plans. -

    -
    -
    -
    - -
    -
    -

    Email Notification

    -
    -

    - Email notification is sent to the corresponding employee including the link to participate in the survey - -

    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    View Answers

    -
    -
    - -
    -
    -
    -

    You can view all the answers here

    - -
    -
    -
    - -
    -
    -

    Settings Menu

    -
    -

    Set access rights for the employees.

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

    Our Odoo Services

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

    Need Any Help?

    - -
    diff --git a/oh_appraisal/static/description/settings.png b/oh_appraisal/static/description/settings.png deleted file mode 100644 index 694ccabe1..000000000 Binary files a/oh_appraisal/static/description/settings.png and /dev/null differ diff --git a/oh_appraisal/static/description/view_answers.png b/oh_appraisal/static/description/view_answers.png deleted file mode 100644 index bed8d5e1a..000000000 Binary files a/oh_appraisal/static/description/view_answers.png and /dev/null differ diff --git a/oh_appraisal/views/hr_appraisal_form_view.xml b/oh_appraisal/views/hr_appraisal_form_view.xml deleted file mode 100644 index f207e56c9..000000000 --- a/oh_appraisal/views/hr_appraisal_form_view.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - hr.appraisal.form - hr.appraisal - 1 - -
    -
    -
    - -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    - - - hr.appraisal.tree - hr.appraisal - - - - - - - - - - - - hr.appraisal.kanban - hr.appraisal - - - - - - -
    - -
    -
    - oe_kanban_text_red - Deadline: -
    -
    - Sent Questions: -
    -
    - Answers: -
    -
    - oe_kanban_text_red - Final Interview: -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - Appraisal - hr.appraisal - form - - kanban,tree,form - - - - - -
    \ No newline at end of file diff --git a/oh_appraisal/views/hr_appraisal_survey_views.xml b/oh_appraisal/views/hr_appraisal_survey_views.xml deleted file mode 100644 index 495a3e1c4..000000000 --- a/oh_appraisal/views/hr_appraisal_survey_views.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - hr_appraisal list - survey.user_input - 1 - - - - - - - - - \ No newline at end of file diff --git a/oh_employee_check_list/README.md b/oh_employee_check_list/README.md deleted file mode 100644 index b543570fc..000000000 --- a/oh_employee_check_list/README.md +++ /dev/null @@ -1,22 +0,0 @@ -OH Employee Checklist ---------------------- -Supporting Addon for Open HRMS, Manages Employee's Entry & Exit Process - -Overview --------- -A well functioning human resource department will lay down a number procedure and process before an employee during joining/resigning time. It may be submission/Return of a certificate or attending a conference etc. -A person has to undergo all these checklist items before being admitted/resigned. The module simplifies the process by providing you a checklist to mark the proceedings. It will also display the PercentPie of the checklist items completed. - -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 -Nilmar Shereef - shereef@cybrosys.in - -Website: -https://www.openhrms.com -https://www.cybrosys.com diff --git a/oh_employee_check_list/__init__.py b/oh_employee_check_list/__init__.py deleted file mode 100644 index 16dcf27c6..000000000 --- a/oh_employee_check_list/__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: Nilmar Shereef () -# -# 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/oh_employee_check_list/__manifest__.py b/oh_employee_check_list/__manifest__.py deleted file mode 100644 index 7f5f850a6..000000000 --- a/oh_employee_check_list/__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: Nilmar Shereef () -# -# 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 Checklist', - 'version': '10.0.1.0.0', - 'summary': """Manages Employee's Entry & Exit Process""", - 'description': """This module is a part of OH project, used to remembering the employee's entry and exit progress.""", - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'oh_employee_documents_expiry'], - 'data': [ - 'security/ir.model.access.csv', - 'views/employee_form_inherit_view.xml', - 'views/settings_view.xml', - 'views/checklist_view.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/oh_employee_check_list/doc/RELEASE_NOTES.md b/oh_employee_check_list/doc/RELEASE_NOTES.md deleted file mode 100644 index 7608da48e..000000000 --- a/oh_employee_check_list/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module 'oh_employee_check_list' - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/oh_employee_check_list/models/__init__.py b/oh_employee_check_list/models/__init__.py deleted file mode 100644 index 2c68740da..000000000 --- a/oh_employee_check_list/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: Nilmar Shereef () -# -# 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 employee_master_inherit -from . import settings - - diff --git a/oh_employee_check_list/models/employee_master_inherit.py b/oh_employee_check_list/models/employee_master_inherit.py deleted file mode 100644 index 88d0f0cd0..000000000 --- a/oh_employee_check_list/models/employee_master_inherit.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Nilmar Shereef () -# -# 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 EmployeeMasterInherit(models.Model): - _inherit = 'hr.employee' - - @api.depends('exit_checklist') - def exit_progress(self): - for each in self: - total_len = self.env['employee.checklist'].search_count([('document_type', '=', 'exit')]) - entry_len = len(each.exit_checklist) - if total_len != 0: - each.exit_progress = (entry_len * 100) / total_len - - @api.depends('entry_checklist') - def entry_progress(self): - for each in self: - total_len = self.env['employee.checklist'].search_count([('document_type', '=', 'entry')]) - entry_len = len(each.entry_checklist) - if total_len != 0: - each.entry_progress = (entry_len*100) / total_len - - entry_checklist = fields.Many2many('employee.checklist', 'entry_obj', 'check_hr_rel', 'hr_check_rel', - string='Entry Process', - domain=[('document_type', '=', 'entry')]) - exit_checklist = fields.Many2many('employee.checklist', 'exit_obj', 'exit_hr_rel', 'hr_exit_rel', - string='Exit Process', - domain=[('document_type', '=', 'exit')]) - entry_progress = fields.Float(compute=entry_progress, string='Entry Progress', store=True, default=0.0) - exit_progress = fields.Float(compute=exit_progress, string='Exit Progress', store=True, default=0.0) - maximum_rate = fields.Integer(default=100) - check_list_enable = fields.Boolean(invisible=True, copy=False) - - -class EmployeeDocumentInherit(models.Model): - _inherit = 'hr.employee.document' - - @api.model - def create(self, vals): - result = super(EmployeeDocumentInherit, self).create(vals) - if result.document_name.document_type == 'entry': - result.employee_ref.write({'entry_checklist': [(4, result.document_name.id)]}) - if result.document_name.document_type == 'exit': - result.employee_ref.write({'exit_checklist': [(4, result.document_name.id)]}) - return result - - @api.multi - def unlink(self): - for result in self: - if result.document_name.document_type == 'entry': - result.employee_ref.write({'entry_checklist': [(5, result.document_name.id)]}) - if result.document_name.document_type == 'exit': - result.employee_ref.write({'exit_checklist': [(5, result.document_name.id)]}) - res = super(EmployeeDocumentInherit, self).unlink() - return res - - -class EmployeeChecklistInherit(models.Model): - _inherit = 'employee.checklist' - - entry_obj = fields.Many2many('hr.employee', 'entry_checklist', 'hr_check_rel', 'check_hr_rel', - invisible=1) - exit_obj = fields.Many2many('hr.employee', 'exit_checklist', 'hr_exit_rel', 'exit_hr_rel', - invisible=1) diff --git a/oh_employee_check_list/models/settings.py b/oh_employee_check_list/models/settings.py deleted file mode 100644 index 308fca549..000000000 --- a/oh_employee_check_list/models/settings.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Nilmar Shereef () -# -# 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 MenuThemes(models.Model): - _name = 'hr.settings' - _inherit = 'res.config.settings' - - enable_checklist = fields.Boolean(string='Enable Checklist Progress in Kanban?') - - @api.multi - def set_enable_checklist(self): - ir_values = self.env['ir.values'] - enable_checklist = self.enable_checklist - ir_values.set_default('hr.settings', 'enable_checklist', enable_checklist) - emp_obj = self.env['hr.employee'].sudo().search([]) - for each in emp_obj: - each.write({'check_list_enable': enable_checklist}) - diff --git a/oh_employee_check_list/security/ir.model.access.csv b/oh_employee_check_list/security/ir.model.access.csv deleted file mode 100644 index 05f0cf020..000000000 --- a/oh_employee_check_list/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.settings_manager,hr.settings.manager,model_hr_settings,hr.group_hr_manager,1,1,1,1 diff --git a/oh_employee_check_list/static/description/HRMS-BUTTON.png b/oh_employee_check_list/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/oh_employee_check_list/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/banner.jpg b/oh_employee_check_list/static/description/banner.jpg deleted file mode 100644 index d55e63353..000000000 Binary files a/oh_employee_check_list/static/description/banner.jpg and /dev/null differ diff --git a/oh_employee_check_list/static/description/cybro-service.png b/oh_employee_check_list/static/description/cybro-service.png deleted file mode 100644 index 0a648278c..000000000 Binary files a/oh_employee_check_list/static/description/cybro-service.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/cybro_logo.png b/oh_employee_check_list/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/oh_employee_check_list/static/description/cybro_logo.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/icon.png b/oh_employee_check_list/static/description/icon.png deleted file mode 100644 index 0885ca68e..000000000 Binary files a/oh_employee_check_list/static/description/icon.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/index.html b/oh_employee_check_list/static/description/index.html deleted file mode 100644 index 0f808430e..000000000 --- a/oh_employee_check_list/static/description/index.html +++ /dev/null @@ -1,166 +0,0 @@ -
    -
    -

    OpenHRMS

    -

    Most advanced open source HR management software

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

    OHRMS Employee Exit/Entry Checklist

    -

    Manages Employees Entry & Exit Process

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Managing entry/exit process.
    - Automatic process on document attachments.
    - Option to enable Gauge widget for employee kanban.
    - Entry/Exit Percentpie in employee form view.
    - Entry Progressbar in employee tree view.
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    -A well functioning human resource department will lay down a number procedure and process before an employee during joining/resigning time. It may be submission/Return of a certificate or attending a conference etc. -A person has to undergo all these checklist items before being admitted/resigned. The module simplifies the process by providing you a checklist to mark the proceedings. It will also display the PercentPie of the checklist items completed. - -

    -
    -
    -
    - -
    -
    -
    -

    -

    Entry/Exit Checklist

    -

    -

    - - -
    -
    - -
    -
    -
    -

    -

    Employee From View With PercentPie

    -

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

    -

    Employee Tree View With Progressbar

    -

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

    -

    Employee Kanban View with Gauge

    -

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

    -

    Configuration

    -

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

    Our Odoo Services

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

    Need Any Help?

    - -
    diff --git a/oh_employee_check_list/static/description/oh_employee_form.png b/oh_employee_check_list/static/description/oh_employee_form.png deleted file mode 100644 index d2e9b8e6e..000000000 Binary files a/oh_employee_check_list/static/description/oh_employee_form.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/oh_entry_checklist.png b/oh_employee_check_list/static/description/oh_entry_checklist.png deleted file mode 100644 index 63f49d419..000000000 Binary files a/oh_employee_check_list/static/description/oh_entry_checklist.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/oh_exit_chceklist.png b/oh_employee_check_list/static/description/oh_exit_chceklist.png deleted file mode 100644 index c971cacc9..000000000 Binary files a/oh_employee_check_list/static/description/oh_exit_chceklist.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/oh_kanban_Settings.png b/oh_employee_check_list/static/description/oh_kanban_Settings.png deleted file mode 100644 index 4eb07c0e1..000000000 Binary files a/oh_employee_check_list/static/description/oh_kanban_Settings.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/oh_kanban_view.png b/oh_employee_check_list/static/description/oh_kanban_view.png deleted file mode 100644 index 55db3068c..000000000 Binary files a/oh_employee_check_list/static/description/oh_kanban_view.png and /dev/null differ diff --git a/oh_employee_check_list/static/description/oh_tree_view.png b/oh_employee_check_list/static/description/oh_tree_view.png deleted file mode 100644 index 4910100e7..000000000 Binary files a/oh_employee_check_list/static/description/oh_tree_view.png and /dev/null differ diff --git a/oh_employee_check_list/views/checklist_view.xml b/oh_employee_check_list/views/checklist_view.xml deleted file mode 100644 index 42e0b1111..000000000 --- a/oh_employee_check_list/views/checklist_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - Entry Checklist - ir.actions.act_window - employee.checklist - form - tree,form - [('document_type', '=', 'entry')] - {"default_document_type":'entry'} - -

    - Click to create a New Entry Checklist -

    -
    -
    - - - Exit Checklist - ir.actions.act_window - employee.checklist - form - tree,form - [('document_type', '=', 'exit')] - {"default_document_type":'exit'} - -

    - Click to create a New Exit Checklist -

    -
    -
    - - - -
    \ No newline at end of file diff --git a/oh_employee_check_list/views/employee_form_inherit_view.xml b/oh_employee_check_list/views/employee_form_inherit_view.xml deleted file mode 100644 index 45df184e2..000000000 --- a/oh_employee_check_list/views/employee_form_inherit_view.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - hr.employee.form.view - hr.employee - - - -
    - - -
    -
    - - - - - - - - - - - - - -
    -
    - - - hr.employee.tree.view - hr.employee - - - - - - - - - - hr.employee.kanban.view - hr.employee - - - - - - - - - -
  • - - Entry Progress - -
  • -
    -
    -
    -
    \ No newline at end of file diff --git a/oh_employee_check_list/views/settings_view.xml b/oh_employee_check_list/views/settings_view.xml deleted file mode 100644 index c1417aecf..000000000 --- a/oh_employee_check_list/views/settings_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - hr.settings.form - hr.settings - -
    -
    -
    - - - - - -
    -
    - - - Hr Settings - hr.settings - form - inline - - - - - -
    -
    \ No newline at end of file diff --git a/oh_employee_documents_expiry/README.md b/oh_employee_documents_expiry/README.md deleted file mode 100644 index ee8775b0a..000000000 --- a/oh_employee_documents_expiry/README.md +++ /dev/null @@ -1,26 +0,0 @@ -OH Employee Documents ---------------------- -Supporting Addon for Open HRMS, Manages Employee Related Documents - -Overview --------- -Each and every detail associated with an employee is useful for any organization for better Human resource management. -So the employee documents with such necessary information must be saved and used accordingly. -'Employee Documents' is a useful tool that can help you to store and manage the employee related -documents like certificates, appraisal reports, passport, license etc. -The application also allows you to set an alert message on reaching the expiration/any other -related dates of a document (like an expiration of passport) - -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 -Nilmar Shereef - shereef@cybrosys.in - -Website: -https://www.openhrms.com -https://www.cybrosys.com diff --git a/oh_employee_documents_expiry/RELEASE_NOTES.md b/oh_employee_documents_expiry/RELEASE_NOTES.md deleted file mode 100644 index 8f06bb30d..000000000 --- a/oh_employee_documents_expiry/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module 'oh_employee_documents_expiry' - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for OpenHrms Project diff --git a/oh_employee_documents_expiry/__init__.py b/oh_employee_documents_expiry/__init__.py deleted file mode 100644 index 16dcf27c6..000000000 --- a/oh_employee_documents_expiry/__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: Nilmar Shereef () -# -# 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/oh_employee_documents_expiry/__manifest__.py b/oh_employee_documents_expiry/__manifest__.py deleted file mode 100644 index ae256c0dd..000000000 --- a/oh_employee_documents_expiry/__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: Nilmar Shereef () -# -# 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 Documents', - 'version': '10.0.1.0', - 'summary': """Manages Employee Documents With Expiry Notifications.""", - 'description': """OH Addon: Manages Employee Related Documents with Expiry Notifications.""", - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr'], - 'data': [ - 'security/ir.model.access.csv', - 'views/employee_check_list_view.xml', - 'views/employee_document_view.xml', - ], - 'demo': ['data/data.xml'], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/oh_employee_documents_expiry/data/data.xml b/oh_employee_documents_expiry/data/data.xml deleted file mode 100644 index ef0581a14..000000000 --- a/oh_employee_documents_expiry/data/data.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Education Certificate - entry - - - Salary Certificate - entry - - - Experience Certificate - entry - - - Experience Certificate - exit - - - Salary Certificate - exit - - \ No newline at end of file diff --git a/oh_employee_documents_expiry/models/__init__.py b/oh_employee_documents_expiry/models/__init__.py deleted file mode 100644 index 6030a78af..000000000 --- a/oh_employee_documents_expiry/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: Nilmar Shereef () -# -# 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 employee_documents -from . import employee_entry_exit_check_list - diff --git a/oh_employee_documents_expiry/models/employee_documents.py b/oh_employee_documents_expiry/models/employee_documents.py deleted file mode 100644 index ca31dca27..000000000 --- a/oh_employee_documents_expiry/models/employee_documents.py +++ /dev/null @@ -1,104 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Nilmar Shereef () -# -# 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, date, timedelta -from odoo import models, fields, api, _ -from odoo.exceptions import Warning - - -class HrEmployeeDocument(models.Model): - _name = 'hr.employee.document' - _description = 'HR Employee Documents' - - def mail_reminder(self): - now = datetime.now() + timedelta(days=1) - date_now = now.date() - match = self.search([]) - for i in match: - if i.expiry_date: - exp_date = fields.Date.from_string(i.expiry_date) - timedelta(days=7) - if date_now >= exp_date: - mail_content = " Hello " + i.employee_ref.name + ",
    Your Document " + i.name + "is going to expire on " + \ - str(i.expiry_date) + ". Please renew it before expiry date" - main_content = { - 'subject': _('Document-%s Expired On %s') % (i.name, i.expiry_date), - 'author_id': self.env.user.partner_id.id, - 'body_html': mail_content, - 'email_to': i.employee_ref.work_email, - } - self.env['mail.mail'].create(main_content).send() - - @api.constrains('expiry_date') - def check_expr_date(self): - for each in self: - if each.expiry_date: - exp_date = fields.Date.from_string(each.expiry_date) - if exp_date < date.today(): - raise Warning('Your Document Is Expired.') - - name = fields.Char(string='Document Number', required=True, copy=False) - document_name = fields.Many2one('employee.checklist', string='Document', required=True) - description = fields.Text(string='Description', copy=False) - expiry_date = fields.Date(string='Expiry Date', copy=False) - employee_ref = fields.Many2one('hr.employee', invisible=1, copy=False) - doc_attachment_id = fields.Many2many('ir.attachment', 'doc_attach_rel', 'doc_id', 'attach_id3', string="Attachment", - help='You can attach the copy of your document', copy=False) - issue_date = fields.Date(string='Issue Date', default=fields.datetime.now(), copy=False) - - -class HrEmployee(models.Model): - _inherit = 'hr.employee' - - @api.multi - def _document_count(self): - for each in self: - document_ids = self.env['hr.employee.document'].sudo().search([('employee_ref', '=', each.id)]) - each.document_count = len(document_ids) - - @api.multi - def document_view(self): - self.ensure_one() - domain = [ - ('employee_ref', '=', self.id)] - return { - 'name': _('Documents'), - 'domain': domain, - 'res_model': 'hr.employee.document', - 'type': 'ir.actions.act_window', - 'view_id': False, - 'view_mode': 'tree,form', - 'view_type': 'form', - 'help': _('''

    - Click to Create for New Documents -

    '''), - 'limit': 80, - 'context': "{'default_employee_ref': '%s'}" % self.id - } - - document_count = fields.Integer(compute='_document_count', string='# Documents') - - -class HrEmployeeAttachment(models.Model): - _inherit = 'ir.attachment' - - doc_attach_rel = fields.Many2many('hr.employee.document', 'doc_attachment_id', 'attach_id3', 'doc_id', - string="Attachment", invisible=1) diff --git a/oh_employee_documents_expiry/models/employee_entry_exit_check_list.py b/oh_employee_documents_expiry/models/employee_entry_exit_check_list.py deleted file mode 100644 index 691916db2..000000000 --- a/oh_employee_documents_expiry/models/employee_entry_exit_check_list.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Nilmar Shereef () -# -# 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 EmployeeEntryDocuments(models.Model): - _name = 'employee.checklist' - _inherit = ['mail.thread', 'ir.needaction_mixin'] - _description = "Employee Documents" - - @api.multi - def name_get(self): - result = [] - for each in self: - if each.document_type == 'entry': - name = each.name + '_en' - elif each.document_type == 'exit': - name = each.name + '_ex' - elif each.document_type == 'other': - name = each.name + '_ot' - result.append((each.id, name)) - return result - - name = fields.Char(string='Name', copy=False, required=1) - document_type = fields.Selection([('entry', 'Entry Process'), - ('exit', 'Exit Process'), - ('other', 'Other')], string='Checklist Type', readonly=1, required=1) - - diff --git a/oh_employee_documents_expiry/security/ir.model.access.csv b/oh_employee_documents_expiry/security/ir.model.access.csv deleted file mode 100644 index 145868907..000000000 --- a/oh_employee_documents_expiry/security/ir.model.access.csv +++ /dev/null @@ -1,7 +0,0 @@ -id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink -access_hr_employee_checklist_user,employee.checklist.user,model_employee_checklist,hr.group_hr_user,1,1,1,1 -access_hr_employee_checklist_emp,employee.checklist.emp,model_employee_checklist,base.group_user,1,0,0,0 -"access_hr_employee_document_employee","hr.employee.document_employee","model_hr_employee_document","base.group_user",1,0,0,0 -"access_hr_employee_document_manager","hr.employee.document_manager","model_hr_employee_document","hr.group_hr_manager",1,1,1,1 -"access_hr_employee_document_user","hr.employee.document_user","model_hr_employee_document","hr.group_hr_user",1,1,1,0 - diff --git a/oh_employee_documents_expiry/static/description/HRMS-BUTTON.png b/oh_employee_documents_expiry/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/oh_employee_documents_expiry/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/banner.jpg b/oh_employee_documents_expiry/static/description/banner.jpg deleted file mode 100644 index b9b6de033..000000000 Binary files a/oh_employee_documents_expiry/static/description/banner.jpg and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/cybro-service.png b/oh_employee_documents_expiry/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/oh_employee_documents_expiry/static/description/cybro-service.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/cybro_logo.png b/oh_employee_documents_expiry/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/oh_employee_documents_expiry/static/description/cybro_logo.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/document_form.png b/oh_employee_documents_expiry/static/description/document_form.png deleted file mode 100644 index 5c570a339..000000000 Binary files a/oh_employee_documents_expiry/static/description/document_form.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/email.png b/oh_employee_documents_expiry/static/description/email.png deleted file mode 100644 index 90b70be6c..000000000 Binary files a/oh_employee_documents_expiry/static/description/email.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/icon.png b/oh_employee_documents_expiry/static/description/icon.png deleted file mode 100644 index 0bfe48f4d..000000000 Binary files a/oh_employee_documents_expiry/static/description/icon.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/index.html b/oh_employee_documents_expiry/static/description/index.html deleted file mode 100644 index 8e77b0df3..000000000 --- a/oh_employee_documents_expiry/static/description/index.html +++ /dev/null @@ -1,128 +0,0 @@ -
    -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

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

    OHRMS Employee Documents

    -

    Manages Employee Related Documents

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Managing Documents of Employees.
    - Documents Types.
    - Expiry Date for Documents.
    - Validation for Expiry Date.
    - Mail Notification Based on Expiry Date.
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    -Each and every detail associated with an employee is useful for any organization for better Human resource management. - So the employee documents with such necessary information must be saved and used accordingly. - 'Employee Documents' is a useful tool that can help you to store and manage the employee related - documents like certificates, appraisal reports, passport, license etc. -The application also allows you to set an alert message on reaching the expiration/any other - related dates of a document (like an expiration of passport) -

    -
    -
    -
    - -
    -
    -
    -

    -

    Documents Super Button

    -

    -

    -
    -
    - -
    -
    -
    -
    - -
    -
    -

    Documents Form

    -
    -
    - -
    -
    -
    -
    - -
    -
    -

    Notification Mail for Expiry Doc

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

    Our Odoo Services

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

    Need Any Help?

    - -
    - - - diff --git a/oh_employee_documents_expiry/static/description/oh_document_form.png b/oh_employee_documents_expiry/static/description/oh_document_form.png deleted file mode 100644 index 594c65059..000000000 Binary files a/oh_employee_documents_expiry/static/description/oh_document_form.png and /dev/null differ diff --git a/oh_employee_documents_expiry/static/description/oh_employee_fom.png b/oh_employee_documents_expiry/static/description/oh_employee_fom.png deleted file mode 100644 index 53e0af5aa..000000000 Binary files a/oh_employee_documents_expiry/static/description/oh_employee_fom.png and /dev/null differ diff --git a/oh_employee_documents_expiry/views/employee_check_list_view.xml b/oh_employee_documents_expiry/views/employee_check_list_view.xml deleted file mode 100644 index eb702bb92..000000000 --- a/oh_employee_documents_expiry/views/employee_check_list_view.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - employee.checklist.form - employee.checklist - -
    - - - - - - -
    - - -
    -
    -
    -
    - - - employee.checklist.tree - employee.checklist - - - - - - - -
    \ No newline at end of file diff --git a/oh_employee_documents_expiry/views/employee_document_view.xml b/oh_employee_documents_expiry/views/employee_document_view.xml deleted file mode 100644 index 7695a396d..000000000 --- a/oh_employee_documents_expiry/views/employee_document_view.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - HR Employee Data Expiration - 1 - days - -1 - - - - - - - - hr.employee.document.form - hr.employee.document - -
    - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - hr.employee.document.tree - hr.employee.document - - - - - - - - - - - hr.employee.form.view - hr.employee - - -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/oh_hr_lawsuit_management/README.md b/oh_hr_lawsuit_management/README.md deleted file mode 100644 index b0093d442..000000000 --- a/oh_hr_lawsuit_management/README.md +++ /dev/null @@ -1,17 +0,0 @@ -OHRMS Legal Actions ---------------------- -Supporting Addon for Open HRMS, Managing Legal Actions - -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/oh_hr_lawsuit_management/__init__.py b/oh_hr_lawsuit_management/__init__.py deleted file mode 100644 index b3d73d4fb..000000000 --- a/oh_hr_lawsuit_management/__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: 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/oh_hr_lawsuit_management/__manifest__.py b/oh_hr_lawsuit_management/__manifest__.py deleted file mode 100644 index 9cd0c70bd..000000000 --- a/oh_hr_lawsuit_management/__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 Legal Actions', - 'version': '10.0.1.1.0', - 'summary': """Managing Legal Actions""", - 'description': 'This module manages legal actions.', - 'category': 'Generic Modules/Human Resources', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': ['base', 'hr'], - 'data': [ - 'security/security.xml', - 'security/ir.model.access.csv', - 'views/legal_action_view.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/oh_hr_lawsuit_management/doc/RELEASE_NOTES.md b/oh_hr_lawsuit_management/doc/RELEASE_NOTES.md deleted file mode 100644 index a2801cf34..000000000 --- a/oh_hr_lawsuit_management/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 07.04.2018 -#### Version 10.0.1.1.0 -##### CHG -- Index updated - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/oh_hr_lawsuit_management/models/__init__.py b/oh_hr_lawsuit_management/models/__init__.py deleted file mode 100644 index fa4f1ea58..000000000 --- a/oh_hr_lawsuit_management/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 legal - - - - diff --git a/oh_hr_lawsuit_management/models/legal.py b/oh_hr_lawsuit_management/models/legal.py deleted file mode 100644 index f7f51a9a7..000000000 --- a/oh_hr_lawsuit_management/models/legal.py +++ /dev/null @@ -1,128 +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 HrLawsuit(models.Model): - _name = 'hr.lawsuit' - _description = 'Hr Lawsuit Management' - _inherit = ['mail.thread', 'ir.needaction_mixin'] - - @api.model - def create(self, vals): - vals['name'] = self.env['ir.sequence'].next_by_code('hr.lawsuit') - return super(HrLawsuit, self).create(vals) - - @api.multi - def won(self): - self.state = 'won' - - @api.multi - def cancel(self): - self.state = 'cancel' - - @api.multi - def loss(self): - self.state = 'fail' - - @api.multi - def process(self): - self.state = 'running' - - @api.depends('party2', 'employee_id') - def set_party2(self): - for each in self: - if each.party2 == 'employee': - each.party2_name = each.employee_id.name - - name = fields.Char(string='Code', copy=False) - company_id = fields.Many2one('res.company', 'Company', readonly=True, - default=lambda self: self.env.user.company_id) - requested_date = fields.Date(string='Date', copy=False, readonly=1, default=datetime.now(), - states={'draft': [('readonly', False)]}) - court_name = fields.Char(string='Court Name', track_visibility='always', - states={'won': [('readonly', True)]}) - judge = fields.Char(string='Judge', track_visibility='always', states={'won': [('readonly', True)]}) - lawyer = fields.Char(string='Lawyer', track_visibility='always', states={'won': [('readonly', True)]}) - party1 = fields.Many2one('res.company', string='Party 1', required=1, readonly=1, - states={'draft': [('readonly', False)]}) - party2 = fields.Selection([('employee', 'Employee')], default='employee', - string='Party 2', required=1, readonly=1, states={'draft': [('readonly', False)]}) - employee_id = fields.Many2one('hr.employee', string='Employee', copy=False, - readonly=1, states={'draft': [('readonly', False)]}) - party2_name = fields.Char(compute='set_party2', string='Name', store=True) - case_details = fields.Html(string='Case Details', copy=False, track_visibility='always') - state = fields.Selection([('draft', 'Draft'), - ('running', 'Running'), - ('cancel', 'Cancelled'), - ('fail', 'Failed'), - ('won', 'Won')], string='Status', - default='draft', track_visibility='always', copy=False) - - -class HrLegalEmployeeMaster(models.Model): - _inherit = 'hr.employee' - - legal_count = fields.Integer(compute='_legal_count', string='# Legal Actions') - - @api.multi - def _legal_count(self): - for each in self: - legal_ids = self.env['hr.lawsuit'].search([('employee_id', '=', each.id)]) - each.legal_count = len(legal_ids) - - @api.multi - def legal_view(self): - for each1 in self: - legal_obj = self.env['hr.lawsuit'].sudo().search([('employee_id', '=', each1.id)]) - legal_ids = [] - for each in legal_obj: - legal_ids.append(each.id) - view_id = self.env.ref('oh_hr_lawsuit_management.hr_lawsuit_form_view').id - if legal_ids: - if len(legal_ids) <= 1: - value = { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'hr.lawsuit', - 'view_id': view_id, - 'type': 'ir.actions.act_window', - 'name': _('Legal Actions'), - 'res_id': legal_ids and legal_ids[0] - } - else: - value = { - 'domain': str([('id', 'in', legal_ids)]), - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'hr.lawsuit', - 'view_id': False, - 'type': 'ir.actions.act_window', - 'name': _('Legal Actions'), - 'res_id': legal_ids - } - - return value - - diff --git a/oh_hr_lawsuit_management/security/ir.model.access.csv b/oh_hr_lawsuit_management/security/ir.model.access.csv deleted file mode 100644 index 4174bb79a..000000000 --- a/oh_hr_lawsuit_management/security/ir.model.access.csv +++ /dev/null @@ -1,6 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_lawsuit_manager","hr.access_hr_lawsuit_manager","model_hr_lawsuit","oh_hr_lawsuit_management.lawsuit_group_manager",1,1,1,1 -"access_hr_lawsuit_manager1","hr.access_hr_lawsuit_manager","model_hr_lawsuit",,1,0,0,0 -"access_case_details_manager","hr.access_case_details_manager","model_case_details","oh_hr_lawsuit_management.lawsuit_group_manager",1,1,1,1 -"access_wizard_lawsuit_manager","hr.access_wizard_lawsuit_manager","model_wizard_lawsuit","oh_hr_lawsuit_management.lawsuit_group_manager",1,1,1,1 -"access_account_invoice","hr.access_account_invoice","account.model_account_invoice","oh_hr_lawsuit_management.lawsuit_group_manager",1,0,0,0 diff --git a/oh_hr_lawsuit_management/security/security.xml b/oh_hr_lawsuit_management/security/security.xml deleted file mode 100644 index 026117cba..000000000 --- a/oh_hr_lawsuit_management/security/security.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Lawsuit - 18 - - - - Lawsuit Manager - - - - - - - Lawsuit multi-company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - diff --git a/oh_hr_lawsuit_management/static/description/HRMS-BUTTON.png b/oh_hr_lawsuit_management/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/oh_hr_lawsuit_management/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/banner.jpg b/oh_hr_lawsuit_management/static/description/banner.jpg deleted file mode 100644 index 491e60d5f..000000000 Binary files a/oh_hr_lawsuit_management/static/description/banner.jpg and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/cybro-service.png b/oh_hr_lawsuit_management/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/oh_hr_lawsuit_management/static/description/cybro-service.png and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/cybro_logo.png b/oh_hr_lawsuit_management/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/oh_hr_lawsuit_management/static/description/cybro_logo.png and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/hr_legal.png b/oh_hr_lawsuit_management/static/description/hr_legal.png deleted file mode 100644 index daeaf9024..000000000 Binary files a/oh_hr_lawsuit_management/static/description/hr_legal.png and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/icon.png b/oh_hr_lawsuit_management/static/description/icon.png deleted file mode 100644 index cd9a8e82d..000000000 Binary files a/oh_hr_lawsuit_management/static/description/icon.png and /dev/null differ diff --git a/oh_hr_lawsuit_management/static/description/index.html b/oh_hr_lawsuit_management/static/description/index.html deleted file mode 100644 index a0dee22de..000000000 --- a/oh_hr_lawsuit_management/static/description/index.html +++ /dev/null @@ -1,89 +0,0 @@ -
    -
    -

    OpenHRMS

    -

    Most advanced open source HR management software

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

    OHRMS Legal Actions

    -

    Manages Leagal Actions

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Managing legal actions.
    - Allows you to take case reports.
    - Option to followup each case.
    -
    -
    -
    - -
    -
    -
    -

    Overview

    -

    - This module managing all legal actions of employees, customer and suppliers. -

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

    Our Odoo Services

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

    Need Any Help?

    - -
    - diff --git a/oh_hr_lawsuit_management/views/legal_action_view.xml b/oh_hr_lawsuit_management/views/legal_action_view.xml deleted file mode 100644 index 532d90f10..000000000 --- a/oh_hr_lawsuit_management/views/legal_action_view.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Lawsuit Code - hr.lawsuit - LC - - - - - hr.lawsuit.form - hr.lawsuit - -
    -
    -
    - - -
    - - -
    -
    -
    -
    - - - hr.lawsuit.tree - hr.lawsuit - - - - - - - - - - - - - - - - - hr.lawsuit.search - hr.lawsuit - - - - - - - - - - - - - - - - - - - - - Legal Management - hr.lawsuit - 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/ohrms_loan/README.md b/ohrms_loan/README.md deleted file mode 100644 index e292e7dce..000000000 --- a/ohrms_loan/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Open HRMS Loan Management -========================= - -Manage Loan Requests. - - -Installation -============ -- www.odoo.com/documentation/10.0/setup/install.html -- Install our custom addon - -License -======= -GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) -(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 ------- - -Developers: Anusha P P - -Maintainer ----------- - -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. diff --git a/ohrms_loan/__init__.py b/ohrms_loan/__init__.py deleted file mode 100644 index 268881c69..000000000 --- a/ohrms_loan/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- -import models - diff --git a/ohrms_loan/__manifest__.py b/ohrms_loan/__manifest__.py deleted file mode 100644 index 76478a147..000000000 --- a/ohrms_loan/__manifest__.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################### -# A part of OpenHRMS Project -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2018-TODAY Cybrosys Technologies (). -# Author: Anusha P P () -# -# 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 Loan Management', - 'version': '10.0.2.0.0', - 'summary': 'Manage Loan Requests', - 'description': """ - Helps you to manage Loan Requests of your company's staff. - """, - 'category': 'Human Resources', - 'author': "Cybrosys Techno Solutions", - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.openhrms.com", - 'depends': [ - 'base', 'hr_payroll', 'hr', 'account', - ], - 'data': [ - 'security/ir.model.access.csv', - 'security/security.xml', - 'views/hr_loan_seq.xml', - 'data/salary_rule_loan.xml', - 'views/hr_loan.xml', - 'views/hr_payroll.xml', - ], - 'demo': [], - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/ohrms_loan/data/salary_rule_loan.xml b/ohrms_loan/data/salary_rule_loan.xml deleted file mode 100644 index 0e3ed6004..000000000 --- a/ohrms_loan/data/salary_rule_loan.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Loan - - LO - - none - code - result = -payslip.total_paid - - - - diff --git a/ohrms_loan/doc/RELEASE_NOTES.md b/ohrms_loan/doc/RELEASE_NOTES.md deleted file mode 100644 index e137010ca..000000000 --- a/ohrms_loan/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,12 +0,0 @@ -## Module - -#### 09.04.2018 -#### Version 10.0.2.0.0 -##### CHG -- file name changed. -- fields removed. - -#### 30.03.2018 -#### Version 10.0.1.0.0 -##### ADD -- Initial commit for Open HRMS Project diff --git a/ohrms_loan/models/__init__.py b/ohrms_loan/models/__init__.py deleted file mode 100644 index aacd08ad3..000000000 --- a/ohrms_loan/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -import hr_loan -import hr_payroll - diff --git a/ohrms_loan/models/hr_loan.py b/ohrms_loan/models/hr_loan.py deleted file mode 100644 index bdf266210..000000000 --- a/ohrms_loan/models/hr_loan.py +++ /dev/null @@ -1,125 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api -from datetime import datetime -from dateutil.relativedelta import relativedelta -from odoo.exceptions import except_orm - - -class HrLoan(models.Model): - _name = 'hr.loan' - _inherit = ['mail.thread', 'ir.needaction_mixin'] - _description = "Loan Request" - - @api.one - def _compute_loan_amount(self): - total_paid = 0.0 - for loan in self: - for line in loan.loan_lines: - if line.paid: - total_paid += line.amount - balance_amount = loan.loan_amount - total_paid - self.total_amount = loan.loan_amount - self.balance_amount = balance_amount - self.total_paid_amount = total_paid - - name = fields.Char(string="Loan Name", default="/", readonly=True) - date = fields.Date(string="Date", default=fields.Date.today(), readonly=True) - employee_id = fields.Many2one('hr.employee', string="Employee", required=True) - department_id = fields.Many2one('hr.department', related="employee_id.department_id", readonly=True, - string="Department") - installment = fields.Integer(string="No Of Installments", default=1) - payment_date = fields.Date(string="Payment Start Date", required=True, default=fields.Date.today()) - loan_lines = fields.One2many('hr.loan.line', 'loan_id', string="Loan Line", index=True) - emp_account_id = fields.Many2one('account.account', string="Loan Account") - treasury_account_id = fields.Many2one('account.account', string="Treasury Account") - journal_id = fields.Many2one('account.journal', string="Journal") - company_id = fields.Many2one('res.company', 'Company', readonly=True, - default=lambda self: self.env.user.company_id, - states={'draft': [('readonly', False)]}) - currency_id = fields.Many2one('res.currency', string='Currency', required=True, - default=lambda self: self.env.user.company_id.currency_id) - job_position = fields.Many2one('hr.job', related="employee_id.job_id", readonly=True, string="Job Position") - loan_amount = fields.Float(string="Loan Amount", required=True) - total_amount = fields.Float(string="Total Amount", readonly=True, compute='_compute_loan_amount') - balance_amount = fields.Float(string="Balance Amount", compute='_compute_loan_amount') - total_paid_amount = fields.Float(string="Total Paid Amount", compute='_compute_loan_amount') - - state = fields.Selection([ - ('draft', 'Draft'), - ('waiting_approval_1', 'Submitted'), - ('waiting_approval_2', 'Waiting Approval'), - ('approve', 'Approved'), - ('refuse', 'Refused'), - ('cancel', 'Canceled'), - ], string="State", default='draft', track_visibility='onchange', copy=False, ) - - @api.model - def create(self, values): - loan_count = self.env['hr.loan'].search_count([('employee_id', '=', values['employee_id']), ('state', '=', 'approve'), - ('balance_amount', '!=', 0)]) - if loan_count: - raise except_orm('Error!', 'The employee has already a pending installment') - else: - values['name'] = self.env['ir.sequence'].get('hr.loan.seq') or ' ' - res = super(HrLoan, self).create(values) - return res - - @api.multi - def action_refuse(self): - return self.write({'state': 'refuse'}) - - @api.multi - def action_submit(self): - self.write({'state': 'waiting_approval_1'}) - - @api.multi - def action_cancel(self): - self.write({'state': 'cancel'}) - - @api.multi - def action_approve(self): - self.write({'state': 'approve'}) - - @api.multi - def compute_installment(self): - """This automatically create the installment the employee need to pay to - company based on payment start date and the no of installments. - """ - for loan in self: - date_start = datetime.strptime(loan.payment_date, '%Y-%m-%d') - amount = loan.loan_amount / loan.installment - for i in range(1, loan.installment + 1): - self.env['hr.loan.line'].create({ - 'date': date_start, - 'amount': amount, - 'employee_id': loan.employee_id.id, - 'loan_id': loan.id}) - date_start = date_start + relativedelta(months=1) - return True - - -class InstallmentLine(models.Model): - _name = "hr.loan.line" - _description = "Installment Line" - - date = fields.Date(string="Payment Date", required=True) - employee_id = fields.Many2one('hr.employee', string="Employee") - amount = fields.Float(string="Amount", required=True) - paid = fields.Boolean(string="Paid") - loan_id = fields.Many2one('hr.loan', string="Loan Ref.") - payslip_id = fields.Many2one('hr.payslip', string="Payslip Ref.") - - -class HrEmployee(models.Model): - _inherit = "hr.employee" - - @api.one - def _compute_employee_loans(self): - """This compute the loan amount and total loans count of an employee. - """ - self.loan_count = self.env['hr.loan'].search_count([('employee_id', '=', self.id)]) - - loan_count = fields.Integer(string="Loan Count", compute='_compute_employee_loans') - - diff --git a/ohrms_loan/models/hr_payroll.py b/ohrms_loan/models/hr_payroll.py deleted file mode 100644 index 4aca27237..000000000 --- a/ohrms_loan/models/hr_payroll.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import models, fields, api - - -class HrPayslip(models.Model): - _inherit = 'hr.payslip' - - @api.one - def compute_total_paid(self): - """This compute the total paid amount of Loan. - """ - total = 0.0 - for line in self.loan_ids: - if line.paid: - total += line.amount - self.total_paid = total - - loan_ids = fields.One2many('hr.loan.line', 'payslip_id', string="Loans") - total_paid = fields.Float(string="Total Loan Amount", compute='compute_total_paid') - - @api.multi - def get_loan(self): - """This gives the installment lines of an employee where the state is not in paid. - """ - loan_list = [] - loan_ids = self.env['hr.loan.line'].search([('employee_id', '=', self.employee_id.id), ('paid', '=', False)]) - for loan in loan_ids: - if loan.loan_id.state == 'approve': - loan_list.append(loan.id) - self.loan_ids = loan_list - return loan_list - - @api.multi - def action_payslip_done(self): - loan_list = [] - for line in self.loan_ids: - if line.paid: - loan_list.append(line.id) - else: - line.payslip_id = False - self.loan_ids = loan_list - return super(HrPayslip, self).action_payslip_done() diff --git a/ohrms_loan/security/ir.model.access.csv b/ohrms_loan/security/ir.model.access.csv deleted file mode 100644 index e5b282ebc..000000000 --- a/ohrms_loan/security/ir.model.access.csv +++ /dev/null @@ -1,17 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_hr_loan_user,hr.loan.group_user,model_hr_loan,base.group_user,1,1,1,0 -access_hr_loan_line_user,hr.loan.line.group_user,model_hr_loan_line,base.group_user,1,1,0,0 -access_hr_loan_officer,hr.loan.group_hr_user,model_hr_loan,hr.group_hr_user,1,1,1,1 -access_hr_loan_line_officer,hr.loan.line.group_hr_user,model_hr_loan_line,hr.group_hr_user,1,1,1,1 -access_account_move_uinvoice_officer,account.move.group_hr_user,account.model_account_move,hr.group_hr_user,1,1,1,1 -access_account_journal_uinvoice_officer,account.journal.group_hr_user,account.model_account_journal,hr.group_hr_user,1,1,1,1 -acces_account_move_line_officer,account.move.line.group_hr_user,account.model_account_move_line,hr.group_hr_user,1,1,1,1 -acces_ account_account_type_officer, account.account.type.group_hr_user,account.model_account_account_type,hr.group_hr_user,1,1,1,1 -access_hr_loan_manager,hr.loan,model_hr_loan,hr.group_hr_manager,1,1,1,1 -access_hr_loan_line_manager,hr.loan.line,model_hr_loan_line,hr.group_hr_manager,1,1,1,1 -access_account_move_uinvoice_manager,account.move,account.model_account_move,hr.group_hr_manager,1,1,1,1 -access_account_journal_uinvoice_manager,account.journal,account.model_account_journal,hr.group_hr_manager,1,1,1,1 -acces_account_move_line_manager,account.move.line,account.model_account_move_line,hr.group_hr_manager,1,1,1,1 -acces_ account_account_type_manager, account.account.type,account.model_account_account_type,hr.group_hr_manager,1,1,1,1 -access_hr_loan_accountant,hr.loan,model_hr_loan,account.group_account_user,1,1,1,0 -access_hr_loan_line_accountant,hr.loan.line,model_hr_loan_line,account.group_account_user,1,1,1,0 \ No newline at end of file diff --git a/ohrms_loan/security/security.xml b/ohrms_loan/security/security.xml deleted file mode 100644 index 5a99058e7..000000000 --- a/ohrms_loan/security/security.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Loan Request Multi Company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Loan Forms 4 - - - - - - - - - - - Loan Forms - [('employee_id.user_id','=',user.id)] - - - - - - - - - - - \ No newline at end of file diff --git a/ohrms_loan/static/description/HRMS-BUTTON.png b/ohrms_loan/static/description/HRMS-BUTTON.png deleted file mode 100644 index 0f1b65bea..000000000 Binary files a/ohrms_loan/static/description/HRMS-BUTTON.png and /dev/null differ diff --git a/ohrms_loan/static/description/accounting_validation.png b/ohrms_loan/static/description/accounting_validation.png deleted file mode 100644 index 134310d78..000000000 Binary files a/ohrms_loan/static/description/accounting_validation.png and /dev/null differ diff --git a/ohrms_loan/static/description/advance_request_approval.png b/ohrms_loan/static/description/advance_request_approval.png deleted file mode 100644 index 30d1cc6e4..000000000 Binary files a/ohrms_loan/static/description/advance_request_approval.png and /dev/null differ diff --git a/ohrms_loan/static/description/banner.jpg b/ohrms_loan/static/description/banner.jpg deleted file mode 100644 index 4be55a5aa..000000000 Binary files a/ohrms_loan/static/description/banner.jpg and /dev/null differ diff --git a/ohrms_loan/static/description/cybro-service.png b/ohrms_loan/static/description/cybro-service.png deleted file mode 100644 index 252929a86..000000000 Binary files a/ohrms_loan/static/description/cybro-service.png and /dev/null differ diff --git a/ohrms_loan/static/description/cybro_logo.png b/ohrms_loan/static/description/cybro_logo.png deleted file mode 100644 index bb309114c..000000000 Binary files a/ohrms_loan/static/description/cybro_logo.png and /dev/null differ diff --git a/ohrms_loan/static/description/icon.png b/ohrms_loan/static/description/icon.png deleted file mode 100644 index e90809a0f..000000000 Binary files a/ohrms_loan/static/description/icon.png and /dev/null differ diff --git a/ohrms_loan/static/description/index.html b/ohrms_loan/static/description/index.html deleted file mode 100644 index 2d97d75ab..000000000 --- a/ohrms_loan/static/description/index.html +++ /dev/null @@ -1,160 +0,0 @@ -
    -
    -
    -

    Open HRMS

    -

    Most advanced open source HR management software

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

    Open HRMS Loan

    -

    Manage Loan request of employees

    -

    Cybrosys Technologies

    -
    -
    -

    Features:

    -
    - Employee can create loan request.
    - Double layer approval, from Accounting & HR Department.
    - Loan amount is deducted from the salary.
    -
    -
    -
    - -
    -
    -
    -
    -

    Overview

    -

    - Open HRMS Loan is a component of Open HRMS suit. - Open HRMS Loan module helps the user to configure different loan policies, assign approval authority, conduct the verification process and sanction loan for employees. -

    -
    -
    -
    -
    - -
    -
    -
    -

    Configuration

    -
    -
    -

    Install the Module "Open HRMS Loan Accounting" in order to enable Accounting Entries. - Enable the option "Loan Approval From Accounting Department" In accounting settings

    -
    -
    - -
    -
    -
    -
    -

    Add the deduction rule for loan in Salary Structure

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

    Loan Request

    -

    Employee can create loan request

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

    Loan Approval

    -

    Once the HR department has given the Approval, the accounts department take the decision

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

    Employee Payslip

    -

    When we create the payslip, all the pending installments will be listed there, - we can manually select the installments that have to be deducted from the salary

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

    Loan Amount Deduction

    -

    When we check the Loan request again, - the deducted installments will be changed to paid.

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

    Our Odoo Services

    -
    -
    - - -
    -

    Need Any Help?

    - -
    diff --git a/ohrms_loan/static/description/loan_amount_deduction.png b/ohrms_loan/static/description/loan_amount_deduction.png deleted file mode 100644 index a6cdded26..000000000 Binary files a/ohrms_loan/static/description/loan_amount_deduction.png and /dev/null differ diff --git a/ohrms_loan/static/description/loan_approval.png b/ohrms_loan/static/description/loan_approval.png deleted file mode 100644 index ceeb2d817..000000000 Binary files a/ohrms_loan/static/description/loan_approval.png and /dev/null differ diff --git a/ohrms_loan/static/description/loan_request.png b/ohrms_loan/static/description/loan_request.png deleted file mode 100644 index 6d3157db4..000000000 Binary files a/ohrms_loan/static/description/loan_request.png and /dev/null differ diff --git a/ohrms_loan/static/description/loan_rule.png b/ohrms_loan/static/description/loan_rule.png deleted file mode 100644 index 330b72cef..000000000 Binary files a/ohrms_loan/static/description/loan_rule.png and /dev/null differ diff --git a/ohrms_loan/static/description/payslip.png b/ohrms_loan/static/description/payslip.png deleted file mode 100644 index 0bcf1637e..000000000 Binary files a/ohrms_loan/static/description/payslip.png and /dev/null differ diff --git a/ohrms_loan/views/hr_loan.xml b/ohrms_loan/views/hr_loan.xml deleted file mode 100644 index 9ee1a8647..000000000 --- a/ohrms_loan/views/hr_loan.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - hr.loan.tree - hr.loan - - - - - - - - - - - - - - hr.loan.form - hr.loan - -
    -
    -
    - - -
    -
    -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    \ No newline at end of file diff --git a/ohrms_loan/views/hr_loan_seq.xml b/ohrms_loan/views/hr_loan_seq.xml deleted file mode 100644 index b4a33e38e..000000000 --- a/ohrms_loan/views/hr_loan_seq.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Loan Request - hr.loan.seq - LO/ - 4 - 1 - 1 - standard - - - \ No newline at end of file diff --git a/ohrms_loan/views/hr_payroll.xml b/ohrms_loan/views/hr_payroll.xml deleted file mode 100644 index 6ee94a1b0..000000000 --- a/ohrms_loan/views/hr_payroll.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - hr.payslip.inherit.form1 - hr.payslip - - - - - - -