+ This module is an application for handling the Attendances for the employees who gone for Onsight jobs
+ or any company purposes, the employee can send the request and the responsible person will receive the request he can either
+ approve or reject the request.If he approve the request the attendance to the corresponding date will add to the registry.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Managing Requests From Onsight Employees.
+ Automatic Addition Of Attendance Through Approval.
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ Select the User and set the "Attendance" field to 'Manual Attendance'
+
+
+
+
+
+
+
+ Fill the mandatory fields and click "Submit" to send request.
+
+
+
+
+
+
+
+ Now the Attendance Request is generated the manager can either 'Approve' or 'Reject' the request.
+
+
+
+
+
+
+
+ Click on 'Approve' to add the attendance.
+
+
+
+
+
+
+
+ Now we can see the attendance is added in the attendance registry
+
+
+ The module helps in getting all pertinent information about the employee in conducting the employee history verification in an organization.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+
+ Features
+
+
+
+ Get The History Of Department And Job Position Held By The Employee.
+ Changes In Salary Of The Employee Can Be Traced.
+ Important Changes Done In The Contract Is Tracked.
+ Get Any Update In The Timesheet Cost For An Employee As History.
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ Provides a new page in the employee form "Employee History".
+
+
+
+
+
+
+
+
+
+ The module helps in getting all pertinent information about the employee in one single click.
+
+
+
+
+
+
+
+
+
+ It shows the history of department and job position along with the updated date.
+
+
+
+
+
diff --git a/history_employee/static/description/oh_icon.png b/history_employee/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/history_employee/static/description/oh_icon.png differ
diff --git a/history_employee/static/description/open-hrms-employee-history-1.png b/history_employee/static/description/open-hrms-employee-history-1.png
new file mode 100644
index 00000000..2555cb32
Binary files /dev/null and b/history_employee/static/description/open-hrms-employee-history-1.png differ
diff --git a/history_employee/static/description/open-hrms-employee-history-2.png b/history_employee/static/description/open-hrms-employee-history-2.png
new file mode 100644
index 00000000..b82c6827
Binary files /dev/null and b/history_employee/static/description/open-hrms-employee-history-2.png differ
diff --git a/history_employee/static/description/open-hrms-employee-history-3.png b/history_employee/static/description/open-hrms-employee-history-3.png
new file mode 100644
index 00000000..40d402bd
Binary files /dev/null and b/history_employee/static/description/open-hrms-employee-history-3.png differ
diff --git a/history_employee/views/employee_history.xml b/history_employee/views/employee_history.xml
new file mode 100644
index 00000000..4c5e484d
--- /dev/null
+++ b/history_employee/views/employee_history.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ hr.employeehistory.view
+ hr.employee
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/history_employee/views/history_views.xml b/history_employee/views/history_views.xml
new file mode 100644
index 00000000..43d8ac98
--- /dev/null
+++ b/history_employee/views/history_views.xml
@@ -0,0 +1,67 @@
+
+
+
+
+ departmenthistory.tree
+ department.history
+ form
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ timesheetcost.tree
+ timesheet.cost
+ form
+ tree
+
+
+
+
+
+
+
+
+
+
+
+ salaryhistory.tree
+ salary.history
+ form
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ contracthistory.tree
+ contract.history
+ form
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hr_custody/README.rst b/hr_custody/README.rst
new file mode 100644
index 00000000..560fb4cf
--- /dev/null
+++ b/hr_custody/README.rst
@@ -0,0 +1,47 @@
+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/12.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
new file mode 100644
index 00000000..6a68978a
--- /dev/null
+++ b/hr_custody/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..c8d716b3
--- /dev/null
+++ b/hr_custody/__manifest__.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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': '12.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': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ '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
new file mode 100644
index 00000000..2c7d63dd
--- /dev/null
+++ b/hr_custody/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module hr_custody
+
+#### 01.03.2019
+#### Version 12.0.1.0.0
+##### ADD
+- Initial commit for Open Hrms Project
diff --git a/hr_custody/models/__init__.py b/hr_custody/models/__init__.py
new file mode 100644
index 00000000..133b2963
--- /dev/null
+++ b/hr_custody/models/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..18601aa7
--- /dev/null
+++ b/hr_custody/models/custody.py
@@ -0,0 +1,208 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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 date, 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', 'mail.activity.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 = date.today()
+
+ # 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)]}, default=datetime.now().strftime('%Y-%m-%d'))
+ 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
new file mode 100644
index 00000000..1881ad48
--- /dev/null
+++ b/hr_custody/models/hr_employee.py
@@ -0,0 +1,118 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..c08b0804
--- /dev/null
+++ b/hr_custody/models/wizard_reason.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..46e90bac
--- /dev/null
+++ b/hr_custody/reports/__init__.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..117a4bac
--- /dev/null
+++ b/hr_custody/reports/custody_report.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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='Property 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
new file mode 100644
index 00000000..7fe305fb
--- /dev/null
+++ b/hr_custody/reports/custody_report.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ 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
new file mode 100644
index 00000000..311521f1
--- /dev/null
+++ b/hr_custody/security/custody_security.xml
@@ -0,0 +1,16 @@
+
+
+
+ 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
new file mode 100644
index 00000000..2c8043f1
--- /dev/null
+++ b/hr_custody/security/ir.model.access.csv
@@ -0,0 +1,13 @@
+"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
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/hr_custody/static/description/HRMS-BUTTON.png differ
diff --git a/hr_custody/static/description/Loan-accounting.jpg b/hr_custody/static/description/Loan-accounting.jpg
new file mode 100644
index 00000000..e8c0e44a
Binary files /dev/null and b/hr_custody/static/description/Loan-accounting.jpg differ
diff --git a/hr_custody/static/description/advance-salary.jpg b/hr_custody/static/description/advance-salary.jpg
new file mode 100644
index 00000000..dc4ceea3
Binary files /dev/null and b/hr_custody/static/description/advance-salary.jpg differ
diff --git a/hr_custody/static/description/advance-salery-accounting.png b/hr_custody/static/description/advance-salery-accounting.png
new file mode 100644
index 00000000..e71b7629
Binary files /dev/null and b/hr_custody/static/description/advance-salery-accounting.png differ
diff --git a/hr_custody/static/description/announcement.jpg b/hr_custody/static/description/announcement.jpg
new file mode 100644
index 00000000..7c9a0be1
Binary files /dev/null and b/hr_custody/static/description/announcement.jpg differ
diff --git a/hr_custody/static/description/attendance-regularization.jpg b/hr_custody/static/description/attendance-regularization.jpg
new file mode 100644
index 00000000..41e42467
Binary files /dev/null and b/hr_custody/static/description/attendance-regularization.jpg differ
diff --git a/hr_custody/static/description/banner.jpg b/hr_custody/static/description/banner.jpg
new file mode 100644
index 00000000..6469f976
Binary files /dev/null and b/hr_custody/static/description/banner.jpg differ
diff --git a/hr_custody/static/description/branch-transfer.jpg b/hr_custody/static/description/branch-transfer.jpg
new file mode 100644
index 00000000..08f39810
Binary files /dev/null and b/hr_custody/static/description/branch-transfer.jpg differ
diff --git a/hr_custody/static/description/core.gif b/hr_custody/static/description/core.gif
new file mode 100644
index 00000000..3b1483e9
Binary files /dev/null and b/hr_custody/static/description/core.gif differ
diff --git a/hr_custody/static/description/custody-management.jpg b/hr_custody/static/description/custody-management.jpg
new file mode 100644
index 00000000..1f952a05
Binary files /dev/null and b/hr_custody/static/description/custody-management.jpg differ
diff --git a/hr_custody/static/description/custody_icon.png b/hr_custody/static/description/custody_icon.png
new file mode 100644
index 00000000..00d1363f
Binary files /dev/null and b/hr_custody/static/description/custody_icon.png differ
diff --git a/hr_custody/static/description/cybro-service.png b/hr_custody/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/hr_custody/static/description/cybro-service.png differ
diff --git a/hr_custody/static/description/cybro_logo.png b/hr_custody/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/hr_custody/static/description/cybro_logo.png differ
diff --git a/hr_custody/static/description/dashboard.gif b/hr_custody/static/description/dashboard.gif
new file mode 100644
index 00000000..003b9d4d
Binary files /dev/null and b/hr_custody/static/description/dashboard.gif differ
diff --git a/hr_custody/static/description/employee-appraisal.jpg b/hr_custody/static/description/employee-appraisal.jpg
new file mode 100644
index 00000000..cbd13706
Binary files /dev/null and b/hr_custody/static/description/employee-appraisal.jpg differ
diff --git a/hr_custody/static/description/employee-background-verification.jpg b/hr_custody/static/description/employee-background-verification.jpg
new file mode 100644
index 00000000..97b80104
Binary files /dev/null and b/hr_custody/static/description/employee-background-verification.jpg differ
diff --git a/hr_custody/static/description/employee-checklist.jpg b/hr_custody/static/description/employee-checklist.jpg
new file mode 100644
index 00000000..47ebda7b
Binary files /dev/null and b/hr_custody/static/description/employee-checklist.jpg differ
diff --git a/hr_custody/static/description/employee-creation-from-user.jpg b/hr_custody/static/description/employee-creation-from-user.jpg
new file mode 100644
index 00000000..b4ffa42a
Binary files /dev/null and b/hr_custody/static/description/employee-creation-from-user.jpg differ
diff --git a/hr_custody/static/description/employee-disciplinary-tracking.jpg b/hr_custody/static/description/employee-disciplinary-tracking.jpg
new file mode 100644
index 00000000..3d4c252c
Binary files /dev/null and b/hr_custody/static/description/employee-disciplinary-tracking.jpg differ
diff --git a/hr_custody/static/description/employee-document.jpg b/hr_custody/static/description/employee-document.jpg
new file mode 100644
index 00000000..6d42f89f
Binary files /dev/null and b/hr_custody/static/description/employee-document.jpg differ
diff --git a/hr_custody/static/description/employee-gratuity-settlement-min.jpg b/hr_custody/static/description/employee-gratuity-settlement-min.jpg
new file mode 100644
index 00000000..8743e456
Binary files /dev/null and b/hr_custody/static/description/employee-gratuity-settlement-min.jpg differ
diff --git a/hr_custody/static/description/employee-histroy.gif b/hr_custody/static/description/employee-histroy.gif
new file mode 100644
index 00000000..73b66613
Binary files /dev/null and b/hr_custody/static/description/employee-histroy.gif differ
diff --git a/hr_custody/static/description/employee-info.jpg b/hr_custody/static/description/employee-info.jpg
new file mode 100644
index 00000000..295c6fe9
Binary files /dev/null and b/hr_custody/static/description/employee-info.jpg differ
diff --git a/hr_custody/static/description/employee-stages.jpg b/hr_custody/static/description/employee-stages.jpg
new file mode 100644
index 00000000..6c3749e4
Binary files /dev/null and b/hr_custody/static/description/employee-stages.jpg differ
diff --git a/hr_custody/static/description/icon.png b/hr_custody/static/description/icon.png
new file mode 100644
index 00000000..8c486ecc
Binary files /dev/null and b/hr_custody/static/description/icon.png differ
diff --git a/hr_custody/static/description/index.html b/hr_custody/static/description/index.html
new file mode 100644
index 00000000..4680a075
--- /dev/null
+++ b/hr_custody/static/description/index.html
@@ -0,0 +1,634 @@
+
+
+ Blues over resource tracking? No more worries.
+ OHRMS Custody Management system constitutes the ultimate
+ solution for a transparent custody of company resources.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Managing custody handling process.
+ Option to renewal.
+ Option to take reports.
+
+
+
+
+
+
+
+
+
+
+
+ Custody Request
+
+
+
+ Create a Custody Request and send for Approval.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hr_custody/views/hr_custody_notification.xml b/hr_custody/views/hr_custody_notification.xml
new file mode 100644
index 00000000..b6746d8f
--- /dev/null
+++ b/hr_custody/views/hr_custody_notification.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ HR Custody Return Notification
+ 1
+ days
+ -1
+
+
+ code
+ model.mail_reminder()
+
+
+
diff --git a/hr_custody/views/hr_employee_view.xml b/hr_custody/views/hr_employee_view.xml
new file mode 100644
index 00000000..148f55ac
--- /dev/null
+++ b/hr_custody/views/hr_employee_view.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ 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
new file mode 100644
index 00000000..189af3fa
--- /dev/null
+++ b/hr_custody/views/notification_mail.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ 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
new file mode 100644
index 00000000..64e79a12
--- /dev/null
+++ b/hr_custody/views/wizard_reason_view.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ wizard.reason.form
+ wizard.reason
+
+
+
+
+
+
+ Update Reason
+ wizard.reason
+ form
+ form
+
+ new
+
+
+
\ No newline at end of file
diff --git a/hr_disciplinary_tracking/README.rst b/hr_disciplinary_tracking/README.rst
new file mode 100755
index 00000000..4e4cafef
--- /dev/null
+++ b/hr_disciplinary_tracking/README.rst
@@ -0,0 +1,40 @@
+OHRMS Disciplinary Action v12
+==============================
+
+Track the Disciplinary actions of Employees
+
+Depends
+=======
+[oh_employee_creation_from_user] addon Open HRMS
+[mail] addon Odoo
+
+Tech
+====
+* [Python] - Models
+* [XML] - Odoo views
+
+Installation
+============
+- www.odoo.com/documentation/11.0/setup/install.html
+- Install our custom addon
+
+
+Bug Tracker
+===========
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
+
+Credits
+=======
+* Cybrosys Techno Solutions
+
+Author
+------
+
+Developer: Ajmal J K @ cybrosys
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/hr_disciplinary_tracking/__init__.py b/hr_disciplinary_tracking/__init__.py
new file mode 100755
index 00000000..a0fdc10f
--- /dev/null
+++ b/hr_disciplinary_tracking/__init__.py
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+from . import models
diff --git a/hr_disciplinary_tracking/__manifest__.py b/hr_disciplinary_tracking/__manifest__.py
new file mode 100755
index 00000000..7603fdb8
--- /dev/null
+++ b/hr_disciplinary_tracking/__manifest__.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2017-TODAY Cybrosys Technologies().
+# Author: Ajmal JK()
+#
+# 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 Disciplinary Tracking',
+ 'version': '12.0.1.0.0',
+ 'summary': """Employee Disciplinary Tracking Management""",
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'category': 'Generic Modules/Human Resources',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'mail', 'oh_employee_creation_from_user'],
+ 'data': ['views/disciplinary_action.xml',
+ 'views/disciplinary_sequence.xml',
+ 'views/category_view.xml',
+ 'security/ir.model.access.csv',
+ 'security/security.xml'],
+ 'demo': [],
+ 'images': ['static/description/banner.jpg'],
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'auto_install': False,
+ 'application': False,
+}
diff --git a/hr_disciplinary_tracking/docs/RELEASE_NOTES.md b/hr_disciplinary_tracking/docs/RELEASE_NOTES.md
new file mode 100755
index 00000000..ba025d6d
--- /dev/null
+++ b/hr_disciplinary_tracking/docs/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module disciplinary_action
+
+#### 10.10.2018
+#### Version 12.0.1.0.0
+##### ADD
+- Initial Commit
diff --git a/hr_disciplinary_tracking/models/__init__.py b/hr_disciplinary_tracking/models/__init__.py
new file mode 100755
index 00000000..37e42e5b
--- /dev/null
+++ b/hr_disciplinary_tracking/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+from . import disciplinary_action
+
diff --git a/hr_disciplinary_tracking/models/disciplinary_action.py b/hr_disciplinary_tracking/models/disciplinary_action.py
new file mode 100755
index 00000000..60f72323
--- /dev/null
+++ b/hr_disciplinary_tracking/models/disciplinary_action.py
@@ -0,0 +1,177 @@
+# -*- coding: utf-8 -*-
+from odoo import fields, models, api, exceptions, _
+import datetime
+from odoo.exceptions import ValidationError,UserError
+date_format = "%Y-%m-%d"
+
+
+class CategoryDiscipline(models.Model):
+
+
+ _name = 'discipline.category'
+ _description = 'Reason Category'
+
+ # Discipline Categories
+
+ code = fields.Char(string="Code",required=True)
+ name = fields.Char(string="Name",required=True)
+ description = fields.Text(string="Details")
+
+class CategoryAction(models.Model):
+
+
+ _name = 'action.category'
+ _description = 'Action Category'
+
+ # Action Categories
+
+ code = fields.Char(string="Code", required=True)
+ name = fields.Char(string="Name", required=True)
+ description = fields.Text(string="Details")
+
+class DisciplinaryAction(models.Model):
+
+
+ _name = 'disciplinary.action'
+ _inherit = ['mail.thread', 'mail.activity.mixin']
+ _description = "Disciplinary Action"
+
+ state = fields.Selection([
+ ('draft', 'Draft'),
+ ('explain', 'Waiting Explanation'),
+ ('submitted', 'Waiting Action'),
+ ('action', 'Action Validated'),
+ ('cancel', 'Cancelled'),
+
+ ], default='draft',track_visibility='onchange')
+
+ name = fields.Char(string='Reference', required=True, copy=False, readonly=True,
+ default=lambda self: _('New'))
+
+ employee_name = fields.Many2one('hr.employee', string='Employee', required=True)
+ department_name = fields.Many2one('hr.department', string='Department', required=True)
+ discipline_reason = fields.Many2one('discipline.category', string='Reason', required=True)
+ explanation = fields.Text(string="Explanation by Employee", help='Employee have to give Explanation'
+ 'to manager about the violation of discipline')
+ action = fields.Many2one('action.category', string="Action")
+ read_only = fields.Boolean(compute="get_user",default=True)
+ warning_letter = fields.Html(string="Warning Letter")
+ suspension_letter = fields.Html(string="Suspension Letter")
+ termination_letter = fields.Html(string="Termination Letter")
+ warning = fields.Integer(default=False)
+ action_details = fields.Text(string="Action Details")
+ attachment_ids = fields.Many2many('ir.attachment', string="Attachments",
+ help="Employee can submit any documents which supports their explanation")
+ note = fields.Text(string="Internal Note")
+ joined_date = fields.Date(string="Joined Date")
+
+
+ # assigning the sequence for the record
+ @api.model
+ def create(self, vals):
+ vals['name'] = self.env['ir.sequence'].next_by_code('disciplinary.action')
+ return super(DisciplinaryAction, self).create(vals)
+
+ # Check the user is a manager or employee
+ @api.depends('read_only')
+ def get_user(self):
+
+ res_user = self.env['res.users'].search([('id', '=', self._uid)])
+ if res_user.has_group('hr.group_hr_manager'):
+ self.read_only = True
+ else:
+ self.read_only = False
+ print(self.read_only)
+
+ # Check the Action Selected
+ @api.onchange('action')
+ def onchange_action(self):
+ if self.action.name == 'Written Warning':
+ self.warning = 1
+ elif self.action.name == 'Suspend the Employee for one Week':
+ self.warning = 2
+ elif self.action.name == 'Terminate the Employee':
+ self.warning = 3
+ elif self.action.name == 'No Action':
+ self.warning = 4
+ else :
+ self.warning = 5
+
+
+
+ @api.onchange('employee_name')
+ @api.depends('employee_name')
+ def onchange_employee_name(self):
+
+ department = self.env['hr.employee'].search([('name','=',self.employee_name.name)])
+ self.department_name = department.department_id.id
+
+ if self.state == 'action' :
+ raise ValidationError(_('You Can not edit a Validated Action !!'))
+
+ @api.onchange('discipline_reason')
+ @api.depends('discipline_reason')
+ def onchange_reason(self):
+ if self.state == 'action' :
+ raise ValidationError(_('You Can not edit a Validated Action !!'))
+
+ @api.multi
+ def assign_function(self):
+
+ for rec in self:
+ rec.state = 'explain'
+
+ @api.multi
+ def cancel_function(self):
+ for rec in self:
+ rec.state = 'cancel'
+
+ @api.multi
+ def set_to_function(self):
+ for rec in self:
+ rec.state = 'draft'
+
+ @api.multi
+ def action_function(self):
+ for rec in self:
+ if not rec.action:
+ raise ValidationError(_('You have to select an Action !!'))
+
+ if self.warning == 1 :
+ if not rec.warning_letter or rec.warning_letter == '
' :
+ raise ValidationError(_('You have to fill up the Warning Letter in Action Information !!'))
+
+ elif self.warning == 2 :
+ if not rec.suspension_letter or rec.suspension_letter == '
':
+ raise ValidationError(_('You have to fill up the Suspension Letter in Action Information !!'))
+
+ elif self.warning == 3 :
+ if not rec.termination_letter or rec.termination_letter == '
':
+ raise ValidationError(_('You have to fill up the Termination Letter in Action Information !!'))
+
+ elif self.warning == 4:
+ self.action_details = "No Action Proceed"
+
+
+ elif self.warning == 5 :
+ if not rec.action_details:
+ raise ValidationError(_('You have to fill up the Action Information !!'))
+ rec.state = 'action'
+
+ @api.multi
+ def explanation_function(self):
+ for rec in self:
+
+ if not rec.explanation:
+ raise ValidationError(_('You must give an explanation !!'))
+ if len(self.explanation.split()) <5 :
+ raise ValidationError(_('Your explanation must contain at least 5 words !!'))
+
+ self.write({
+ 'state' : 'submitted'
+ })
+
+
+
+
+
diff --git a/hr_disciplinary_tracking/security/ir.model.access.csv b/hr_disciplinary_tracking/security/ir.model.access.csv
new file mode 100755
index 00000000..cf8c2ee9
--- /dev/null
+++ b/hr_disciplinary_tracking/security/ir.model.access.csv
@@ -0,0 +1,8 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+view_disciplinary_action,view.disciplinary.action,model_disciplinary_action,hr.group_hr_manager,1,1,1,1
+view_disciplinary_action_user,view.disciplinary.action.user,model_disciplinary_action,base.group_user,1,1,0,0
+view_discipline_category,view.discipline.category,model_discipline_category,hr.group_hr_manager,1,1,1,1
+view_action_category,view.action.category,model_action_category,hr.group_hr_manager,1,1,1,1
+
+
+
diff --git a/hr_disciplinary_tracking/security/security.xml b/hr_disciplinary_tracking/security/security.xml
new file mode 100755
index 00000000..40a60172
--- /dev/null
+++ b/hr_disciplinary_tracking/security/security.xml
@@ -0,0 +1,15 @@
+
+
+
+ Discipline Visibility
+
+ [('employee_name.address_home_id.id','=',user.partner_id.id),('state','!=','draft')]
+
+
+
+ Administrator Visibility
+
+ []
+
+
+
diff --git a/hr_disciplinary_tracking/static/description/HRMS-BUTTON.png b/hr_disciplinary_tracking/static/description/HRMS-BUTTON.png
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/HRMS-BUTTON.png differ
diff --git a/hr_disciplinary_tracking/static/description/banner.jpg b/hr_disciplinary_tracking/static/description/banner.jpg
new file mode 100755
index 00000000..a2994ee3
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/banner.jpg differ
diff --git a/hr_disciplinary_tracking/static/description/cybro-service.png b/hr_disciplinary_tracking/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/cybro-service.png differ
diff --git a/hr_disciplinary_tracking/static/description/cybro_logo.png b/hr_disciplinary_tracking/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/cybro_logo.png differ
diff --git a/hr_disciplinary_tracking/static/description/icon.png b/hr_disciplinary_tracking/static/description/icon.png
new file mode 100755
index 00000000..a2349a1d
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/icon.png differ
diff --git a/hr_disciplinary_tracking/static/description/index.html b/hr_disciplinary_tracking/static/description/index.html
new file mode 100755
index 00000000..8d4f5b43
--- /dev/null
+++ b/hr_disciplinary_tracking/static/description/index.html
@@ -0,0 +1,376 @@
+
+
+ This module will help to track and maintain disciplinary actions of employees.
+ Manager can assign disciplinary issues to the employees.
+ Employees can give explanations against the issues and submit to the manager.
+ According to the explanation of employee manager can take the final action.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Manager can assign disciplinary issues to the employees.
+ Employees give explanations and submit it to the manager.
+ Manager can take the final action against the employee according to the Explanation.
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ Select the Employee and the Discipline Reason and click 'Proceed'
+
+
+
+
+
+
+
+ Give the Explanation and click 'Submit'
+
+
+
+
+
+
+
+ Select the Action and Action Information and click 'Validate Action'
+
+
+
+
+
+
+
+ Click 'Action Category' menu to create new Action categories
+
+
+
+
+
+
+
+ Click 'Discipline Category' menu to create new Discipline Category reasons
+
+
+
\ No newline at end of file
diff --git a/hr_disciplinary_tracking/static/description/oh_icon.png b/hr_disciplinary_tracking/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/oh_icon.png differ
diff --git a/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-1.png b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-1.png
new file mode 100644
index 00000000..69be61d0
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-1.png differ
diff --git a/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-2.png b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-2.png
new file mode 100644
index 00000000..ee9c59a6
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-2.png differ
diff --git a/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-3.png b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-3.png
new file mode 100644
index 00000000..00ed3ffa
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-3.png differ
diff --git a/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-4.png b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-4.png
new file mode 100644
index 00000000..0c127d7e
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-4.png differ
diff --git a/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-5.png b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-5.png
new file mode 100644
index 00000000..d712e9ce
Binary files /dev/null and b/hr_disciplinary_tracking/static/description/open-hrms-disciplinary-action-5.png differ
diff --git a/hr_disciplinary_tracking/views/category_view.xml b/hr_disciplinary_tracking/views/category_view.xml
new file mode 100755
index 00000000..810a429f
--- /dev/null
+++ b/hr_disciplinary_tracking/views/category_view.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+ RULES
+ Violation of Company Rules
+
+
+ BEHAVE
+ Misbehaviour to Co-workers
+
+
+ DAMAGE
+ Damage to Company Properties
+
+
+ INSTRUCTION
+ Not Follow Management Instructions
+
+
+ INSTRUCTION
+ Work Performance Issues
+
+
+
+
+
+ NOACTION
+ No Action
+
+
+
+ VERBAL
+ Verbal Warning
+
+
+
+
+ WRITTEN
+ Written Warning
+
+
+
+ MEET
+ Meet the Manager
+
+
+
+ SUSPENSION
+ Suspend the Employee
+ Suspend the Employee for one Week
+
+
+
+ TERMINATE
+ Terminate the Employee
+
+
+
+
+
+ discipline.category.tree
+ discipline.category
+
+
+
+
+
+
+
+
+
+ discipline.category.form
+ discipline.category
+
+
+
+
+
+
+
+
+ action.category.tree
+ action.category
+
+
+
+
+
+
+
+
+ action.category.form
+ action.category
+
+
+
+
+
+
+
+
+ Discipline Categories
+ discipline.category
+ form
+ tree,form
+
+
+
+ Action Categories
+ action.category
+ form
+ tree,form
+
+
+
+
+
+
+
+
+
+
diff --git a/hr_disciplinary_tracking/views/disciplinary_action.xml b/hr_disciplinary_tracking/views/disciplinary_action.xml
new file mode 100755
index 00000000..77c348ef
--- /dev/null
+++ b/hr_disciplinary_tracking/views/disciplinary_action.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+ disciplinary.action.tree
+ disciplinary.action
+
+
+
+
+
+
+
+
+
+
+ disciplinary.action.form
+ disciplinary.action
+
+
+
+
+
+
+
+ Disciplinary Action Creation
+ disciplinary.action
+ form
+ tree,form
+ [('state','!=','action')]
+
+
+
+ Disciplinary Action View
+ disciplinary.action
+ form
+ tree,form
+
+
+
+
+ inherit.employee.form.view
+ hr.employee
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hr_disciplinary_tracking/views/disciplinary_sequence.xml b/hr_disciplinary_tracking/views/disciplinary_sequence.xml
new file mode 100755
index 00000000..dcebfce6
--- /dev/null
+++ b/hr_disciplinary_tracking/views/disciplinary_sequence.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ Open HRMS Disciplinary Action
+ disciplinary.action
+ DIS
+ 3
+
+
+
+
diff --git a/hr_employee_shift/README.rst b/hr_employee_shift/README.rst
new file mode 100644
index 00000000..a28b2f07
--- /dev/null
+++ b/hr_employee_shift/README.rst
@@ -0,0 +1,43 @@
+OHRMS Employee Shift v12
+========================
+
+Easily create, manage, and track employee shift schedules
+
+Depends
+=======
+[hr] addon Odoo
+
+Tech
+====
+* [Python] - Models
+* [XML] - Odoo views
+
+Installation
+============
+- www.odoo.com/documentation/10.0/setup/install.html
+- Install our custom addon
+
+License
+=======
+GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (LGPLv3)
+(http://www.gnu.org/licenses/agpl.html)
+
+Bug Tracker
+===========
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
+
+Credits
+=======
+* Cybrosys Techno Solutions
+
+Author
+------
+
+Developer: Saritha Sahadevan, saritha@cybrosys.in
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/hr_employee_shift/__init__.py b/hr_employee_shift/__init__.py
new file mode 100644
index 00000000..7cacd9c2
--- /dev/null
+++ b/hr_employee_shift/__init__.py
@@ -0,0 +1,23 @@
+# -*- 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
new file mode 100644
index 00000000..7dbe2c8a
--- /dev/null
+++ b/hr_employee_shift/__manifest__.py
@@ -0,0 +1,49 @@
+# -*- 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': '12.0.1.0.0',
+ 'summary': """Easily create, manage, and track employee shift schedules.""",
+ 'description': """Easily create, manage, and track employee shift schedules.""",
+ 'category': 'Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['hr', 'hr_payroll', 'resource'],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'security/hr_employee_shift_security.xml',
+ 'views/hr_employee_shift_view.xml',
+ 'views/hr_employee_contract_view.xml',
+ 'views/hr_generate_shift_view.xml',
+ 'views/templates.xml',
+ ],
+ 'demo': [
+ 'demo/shift_schedule_data.xml',
+ ],
+ 'images': ["static/description/banner.jpg"],
+ 'license': "AGPL-3",
+ 'installable': True,
+ 'application': True,
+}
diff --git a/hr_employee_shift/demo/shift_schedule_data.xml b/hr_employee_shift/demo/shift_schedule_data.xml
new file mode 100644
index 00000000..863a8544
--- /dev/null
+++ b/hr_employee_shift/demo/shift_schedule_data.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+ Morning
+
+
+
+
+
+
diff --git a/hr_employee_shift/doc/RELEASE_NOTES.md b/hr_employee_shift/doc/RELEASE_NOTES.md
new file mode 100644
index 00000000..38c40aed
--- /dev/null
+++ b/hr_employee_shift/doc/RELEASE_NOTES.md
@@ -0,0 +1,11 @@
+## Module
+
+#### 21.04.2018
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for OpenHrms Project
+
+#### 17.12.2018
+#### Version 11.0.1.0.1
+##### ADD
+- Payslip creation considering employee shift
\ No newline at end of file
diff --git a/hr_employee_shift/models/__init__.py b/hr_employee_shift/models/__init__.py
new file mode 100644
index 00000000..15320eb5
--- /dev/null
+++ b/hr_employee_shift/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
+# from . import resource
diff --git a/hr_employee_shift/models/hr_employee_contract.py b/hr_employee_shift/models/hr_employee_contract.py
new file mode 100644
index 00000000..1f0884e2
--- /dev/null
+++ b/hr_employee_shift/models/hr_employee_contract.py
@@ -0,0 +1,77 @@
+# -*- 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)
+ company_id = fields.Many2one('res.company', string='Company')
+
+ @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
new file mode 100644
index 00000000..6e155e64
--- /dev/null
+++ b/hr_employee_shift/models/hr_employee_shift.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHrms Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Saritha Sahadevan ()
+#
+# This program is free software: you can modify
+# it under the terms of the GNU Affero General Public License (AGPL) as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+###################################################################################
+from odoo.exceptions import ValidationError
+from odoo import models, fields, api, _
+
+
+class HrEmployeeInherited(models.Model):
+ _inherit = 'hr.employee'
+
+ resource_calendar_ids = fields.Many2one('resource.calendar', 'Working Hours')
+
+
+class HrEmployeeShift(models.Model):
+ _inherit = 'resource.calendar'
+
+ def _get_default_attendance_ids(self):
+ return [
+ (0, 0, {'name': _('Monday Morning'), 'dayofweek': '0', 'hour_from': 8, 'hour_to': 12}),
+ (0, 0, {'name': _('Tuesday Morning'), 'dayofweek': '1', 'hour_from': 8, 'hour_to': 12}),
+ (0, 0, {'name': _('Wednesday Morning'), 'dayofweek': '2', 'hour_from': 8, 'hour_to': 12}),
+ (0, 0, {'name': _('Thursday Morning'), 'dayofweek': '3', 'hour_from': 8, 'hour_to': 12}),
+ (0, 0, {'name': _('Friday Morning'), 'dayofweek': '4', 'hour_from': 8, 'hour_to': 12}),
+ ]
+
+ color = fields.Integer(string='Color Index')
+ hr_department = fields.Many2one('hr.department', string="Department", required=True)
+ sequence = fields.Integer(string="Sequence", required=True, default=1)
+ attendance_ids = fields.One2many(
+ 'resource.calendar.attendance', 'calendar_id', 'Workingssss Time',
+ copy=True, default=_get_default_attendance_ids)
+
+ @api.constrains('sequence')
+ def validate_seq(self):
+ if self.hr_department.id:
+ record = self.env['resource.calendar'].search([('hr_department', '=', self.hr_department.id),
+ ('sequence', '=', self.sequence),
+ ('company_id', '=', self.company_id.id)
+ ])
+ 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
new file mode 100644
index 00000000..2eda931b
--- /dev/null
+++ b/hr_employee_shift/models/hr_generate_shift.py
@@ -0,0 +1,102 @@
+# -*- 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)
+ company_id = fields.Many2one('res.company', string='Company')
+
+ 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
new file mode 100644
index 00000000..86715171
--- /dev/null
+++ b/hr_employee_shift/models/hr_shift_payroll.py
@@ -0,0 +1,197 @@
+# -*- 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 timedelta
+from odoo import models, fields, api, _, tools
+from datetime import datetime, time
+import datetime
+import math
+from pytz import utc
+from odoo.tools.float_utils import float_round
+from collections import namedtuple
+
+
+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.leave'].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 contract_ids:
+ uom_hour = self.env.ref('product.product_uom_hour', raise_if_not_found=False)
+ interval_data = []
+ holidays = self.env['hr.leave']
+ 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.datetime.strptime(str(days.start_date), tools.DEFAULT_SERVER_DATE_FORMAT)
+ end_date = datetime.datetime.strptime(str(days.end_date), tools.DEFAULT_SERVER_DATE_FORMAT)
+ nb_of_days = (days.end_date - days.start_date).days + 1
+ for day in range(0, nb_of_days):
+ working_intervals_on_day = days.hr_shift._get_day_work_intervals(
+ 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
+
+
+class Calendar(models.Model):
+ _inherit = 'resource.calendar'
+ _interval_obj = namedtuple('Interval', ('start_datetime', 'end_datetime', 'data'))
+
+ def string_to_datetime(self, value):
+ """ Convert the given string value to a datetime in UTC. """
+ return utc.localize(fields.Datetime.from_string(value))
+
+ def float_to_time(self, hours):
+ """ Convert a number of hours into a time object. """
+ if hours == 24.0:
+ return time.max
+ fractional, integral = math.modf(hours)
+ return time(int(integral), int(float_round(60 * fractional, precision_digits=0)), 0)
+
+ def _interval_new(self, start_datetime, end_datetime, kw=None):
+ kw = kw if kw is not None else dict()
+ kw.setdefault('attendances', self.env['resource.calendar.attendance'])
+ kw.setdefault('leaves', self.env['resource.calendar.leaves'])
+ return self._interval_obj(start_datetime, end_datetime, kw)
+
+ @api.multi
+ def _get_day_work_intervals(self, day_date, start_time=None, end_time=None, compute_leaves=False,
+ resource_id=None):
+ self.ensure_one()
+
+ if not start_time:
+ start_time = datetime.time.min
+ if not end_time:
+ end_time = datetime.time.max
+
+ working_intervals = [att_interval for att_interval in
+ self._iter_day_attendance_intervals(day_date, start_time, end_time)]
+
+ # filter according to leaves
+ if compute_leaves:
+ leaves = self._get_leave_intervals(
+ resource_id=resource_id,
+ start_datetime=datetime.datetime.combine(day_date, start_time),
+ end_datetime=datetime.datetime.combine(day_date, end_time))
+ working_intervals = [
+ sub_interval
+ for interval in working_intervals
+ for sub_interval in self._leave_intervals(interval, leaves)]
+
+ # adapt tz
+ return [self._interval_new(
+ self.string_to_datetime(interval[0]),
+ self.string_to_datetime(interval[1]),
+ interval[2]) for interval in working_intervals]
+
+ @api.multi
+ def _get_day_attendances(self, day_date, start_time, end_time):
+ """ Given a day date, return matching attendances. Those can be limited
+ by starting and ending time objects. """
+ self.ensure_one()
+ weekday = day_date.weekday()
+ attendances = self.env['resource.calendar.attendance']
+
+ for attendance in self.attendance_ids.filtered(
+ lambda att:
+ int(att.dayofweek) == weekday and
+ not (att.date_from and fields.Date.from_string(att.date_from) > day_date) and
+ not (att.date_to and fields.Date.from_string(att.date_to) < day_date)):
+ if start_time and self.float_to_time(attendance.hour_to) < start_time:
+ continue
+ if end_time and self.float_to_time(attendance.hour_from) > end_time:
+ continue
+ attendances |= attendance
+ return attendances
+
+ def _iter_day_attendance_intervals(self, day_date, start_time, end_time):
+ """ Get an iterator of all interval of current day attendances. """
+ for calendar_working_day in self._get_day_attendances(day_date, start_time, end_time):
+ from_time = self.float_to_time(calendar_working_day.hour_from)
+ to_time = self.float_to_time(calendar_working_day.hour_to)
+
+ dt_f = datetime.datetime.combine(day_date, max(from_time, start_time))
+ dt_t = datetime.datetime.combine(day_date, min(to_time, end_time))
+
+ yield self._interval_new(dt_f, dt_t, {'attendances': calendar_working_day})
+
+
+
diff --git a/hr_employee_shift/security/hr_employee_shift_security.xml b/hr_employee_shift/security/hr_employee_shift_security.xml
new file mode 100644
index 00000000..2b9a2088
--- /dev/null
+++ b/hr_employee_shift/security/hr_employee_shift_security.xml
@@ -0,0 +1,16 @@
+
+
+
+ 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
new file mode 100644
index 00000000..a51d85c3
--- /dev/null
+++ b/hr_employee_shift/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/hr_employee_shift/static/description/HRMS-BUTTON.png differ
diff --git a/hr_employee_shift/static/description/banner.jpg b/hr_employee_shift/static/description/banner.jpg
new file mode 100644
index 00000000..9d697827
Binary files /dev/null and b/hr_employee_shift/static/description/banner.jpg differ
diff --git a/hr_employee_shift/static/description/cybro-service.png b/hr_employee_shift/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/hr_employee_shift/static/description/cybro-service.png differ
diff --git a/hr_employee_shift/static/description/cybro_logo.png b/hr_employee_shift/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/hr_employee_shift/static/description/cybro_logo.png differ
diff --git a/hr_employee_shift/static/description/icon.png b/hr_employee_shift/static/description/icon.png
new file mode 100644
index 00000000..674251dd
Binary files /dev/null and b/hr_employee_shift/static/description/icon.png differ
diff --git a/hr_employee_shift/static/description/index.html b/hr_employee_shift/static/description/index.html
new file mode 100644
index 00000000..b91b4a95
--- /dev/null
+++ b/hr_employee_shift/static/description/index.html
@@ -0,0 +1,370 @@
+
+
+
+ Employee Shift Management
+
+
+ Easily create, manage, and track employee shift schedules.
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Define list of Work Shifts
+ Define flexible hour wise shift
+ Assign shift in employee contract
+ Assign new shift automatically
+
+
+
+
+
+
+
+
+
+
+ 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.
+
+
+ Transferring employees between company is a basic thing in an organization. Odoo lacks a provision for employee transfer. This module gives a basic structure for employee transfer.
+ Make sure that your multi company is enabled.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Transfer employee between branches.
+ Create new contract for the employee.
+
+
+
+
+
+
+
+
+ Employee Transfer
+
+
+
+ Create an Employee Transfer, select the transfer company and click on the transfer button.
+
+
+
+
+
diff --git a/hr_employee_transfer/static/description/oh_icon.png b/hr_employee_transfer/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/hr_employee_transfer/static/description/oh_icon.png differ
diff --git a/hr_employee_transfer/static/description/open-hrms-employee-transfer-1.jpg b/hr_employee_transfer/static/description/open-hrms-employee-transfer-1.jpg
new file mode 100644
index 00000000..c7cae211
Binary files /dev/null and b/hr_employee_transfer/static/description/open-hrms-employee-transfer-1.jpg differ
diff --git a/hr_employee_transfer/static/description/open-hrms-employee-transfer-2.jpg b/hr_employee_transfer/static/description/open-hrms-employee-transfer-2.jpg
new file mode 100644
index 00000000..fe5cf039
Binary files /dev/null and b/hr_employee_transfer/static/description/open-hrms-employee-transfer-2.jpg differ
diff --git a/hr_employee_transfer/static/description/transfer_icon.png b/hr_employee_transfer/static/description/transfer_icon.png
new file mode 100644
index 00000000..6986e829
Binary files /dev/null and b/hr_employee_transfer/static/description/transfer_icon.png differ
diff --git a/hr_employee_transfer/views/employee_transfer.xml b/hr_employee_transfer/views/employee_transfer.xml
new file mode 100755
index 00000000..bb4421b3
--- /dev/null
+++ b/hr_employee_transfer/views/employee_transfer.xml
@@ -0,0 +1,107 @@
+
+
+
+ Employee Transfer
+ employee.transfer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
new file mode 100755
index 00000000..93877f95
--- /dev/null
+++ b/hr_employee_updation/README.md
@@ -0,0 +1,17 @@
+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
new file mode 100755
index 00000000..9c6d6e05
--- /dev/null
+++ b/hr_employee_updation/__init__.py
@@ -0,0 +1,25 @@
+# -*- 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_employee_updation/__manifest__.py b/hr_employee_updation/__manifest__.py
new file mode 100755
index 00000000..6de973b3
--- /dev/null
+++ b/hr_employee_updation/__manifest__.py
@@ -0,0 +1,44 @@
+# -*- 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 Employee Info',
+ 'version': '12.0.2.0.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,Open HRMS',
+ '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
new file mode 100755
index 00000000..eb5bffcd
--- /dev/null
+++ b/hr_employee_updation/doc/RELEASE_NOTES.md
@@ -0,0 +1,11 @@
+## Module
+
+#### 19.05.2018
+#### Version 11.0.2.0.0
+##### FIX
+- Bug fixed (key error: employee_ref)
+
+#### 10.04.2018
+#### Version 11.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
new file mode 100755
index 00000000..7e7089a6
--- /dev/null
+++ b/hr_employee_updation/models/__init__.py
@@ -0,0 +1,27 @@
+# -*- 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_employee
+
+
+
+
diff --git a/hr_employee_updation/models/hr_employee.py b/hr_employee_updation/models/hr_employee.py
new file mode 100755
index 00000000..2f15e9f7
--- /dev/null
+++ b/hr_employee_updation/models/hr_employee.py
@@ -0,0 +1,110 @@
+# -*- 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 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'
+
+
+ employee_id = fields.Many2one('hr.employee', string="Employee", help='Select corresponding Employee',
+ invisible=1)
+
+ member_name = fields.Char(string='Name')
+ 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')
+
+
+class HrEmployee(models.Model):
+ _inherit = 'hr.employee'
+
+ def mail_reminder(self):
+ """Sending expiry date notification for ID and Passport"""
+
+ 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'].sudo().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'].sudo().create(main_content).send()
+ personal_mobile = fields.Char(string='Mobile', related='address_home_id.mobile', store=True)
+ 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')
+ emergency_contacts = fields.One2many('hr.emergency.contact', 'employee_obj', string='Emergency Contact')
+
+
+
diff --git a/hr_employee_updation/security/ir.model.access.csv b/hr_employee_updation/security/ir.model.access.csv
new file mode 100755
index 00000000..c17dd7d9
--- /dev/null
+++ b/hr_employee_updation/security/ir.model.access.csv
@@ -0,0 +1,7 @@
+"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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_employee_updation/static/description/HRMS-BUTTON.png differ
diff --git a/hr_employee_updation/static/description/banner.jpg b/hr_employee_updation/static/description/banner.jpg
new file mode 100755
index 00000000..663c0a0a
Binary files /dev/null and b/hr_employee_updation/static/description/banner.jpg differ
diff --git a/hr_employee_updation/static/description/cybro-service.png b/hr_employee_updation/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_employee_updation/static/description/cybro-service.png differ
diff --git a/hr_employee_updation/static/description/cybro_logo.png b/hr_employee_updation/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_employee_updation/static/description/cybro_logo.png differ
diff --git a/hr_employee_updation/static/description/icon.png b/hr_employee_updation/static/description/icon.png
new file mode 100755
index 00000000..cc02f7a6
Binary files /dev/null and b/hr_employee_updation/static/description/icon.png differ
diff --git a/hr_employee_updation/static/description/index.html b/hr_employee_updation/static/description/index.html
new file mode 100755
index 00000000..41f92829
--- /dev/null
+++ b/hr_employee_updation/static/description/index.html
@@ -0,0 +1,369 @@
+
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Provision for family information.
+ Provision for joining date and contact info.
+ Provision for passport and id expiry date and attachments.
+ Provision for expiry notification for passport and id documents.
+
+ Employee Gratuity Settlement is a component of Open HRMS suit. This module manages employee settlements during resignation process.
+ A Gratuity Settlement can be created only if the Resignation Request of the employee is approved.
+ The Gratuity amount is calculated by the basic equation, Last drawn salary (basic salary plus dearness allowance) * number of completed years of service * 15/26.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Manager can create Gratuity Settlements of Employees.
+ A settlement can be created only if the Resignation Request of the employee is approved.
+ The Gratuity Amount is calculated based on a predefined equation.
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ You can create Gratuity Settlement once the 'Resignation Request' of the employee is approved.
+
+
+
+
+
+
+
+ Select the Employee and click 'Validate'.
+
+
+
+
+
+
+
+ The last salary of employee is calculated from his latest payslip. Click 'Calculate' to calculate the Gratuity amount.
+
+
+
+
+
+
+
+ The Gratuity amount is calculated based on the basic equation.
+
+
+
\ No newline at end of file
diff --git a/hr_gratuity_settlement/static/description/oh_icon.png b/hr_gratuity_settlement/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/hr_gratuity_settlement/static/description/oh_icon.png differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-1.png b/hr_gratuity_settlement/static/description/open-hrms-gratuity-1.png
new file mode 100755
index 00000000..66782793
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-1.png differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-2.png b/hr_gratuity_settlement/static/description/open-hrms-gratuity-2.png
new file mode 100755
index 00000000..965bc0f4
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-2.png differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-3.png b/hr_gratuity_settlement/static/description/open-hrms-gratuity-3.png
new file mode 100755
index 00000000..7e5aad0d
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-3.png differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-4.png b/hr_gratuity_settlement/static/description/open-hrms-gratuity-4.png
new file mode 100755
index 00000000..f40f61a9
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-4.png differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.gif b/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.gif
new file mode 100644
index 00000000..55cb63f0
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.gif differ
diff --git a/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.png b/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.png
new file mode 100644
index 00000000..ed9ca6da
Binary files /dev/null and b/hr_gratuity_settlement/static/description/open-hrms-gratuity-5.png differ
diff --git a/hr_gratuity_settlement/views/employee_gratuity_view.xml b/hr_gratuity_settlement/views/employee_gratuity_view.xml
new file mode 100755
index 00000000..2dfa825b
--- /dev/null
+++ b/hr_gratuity_settlement/views/employee_gratuity_view.xml
@@ -0,0 +1,109 @@
+
+
+
+
+ hr.gratuity.tree
+ hr.gratuity
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hr.gratuity.form
+ hr.gratuity
+
+
+
+
+
+
+ Gratuity Analysis
+ hr.gratuity
+ pivot
+
+
+
+
+
+
+
+
+
+
+
+ Gratuity Settlement
+ hr.gratuity
+ form
+ tree,form
+
+
+
+ Gratuity Analysis
+ hr.gratuity
+ form
+ pivot
+ []
+
+
+
+
+
+
+
+
+
diff --git a/hr_gratuity_settlement/views/gratuity_sequence.xml b/hr_gratuity_settlement/views/gratuity_sequence.xml
new file mode 100755
index 00000000..9ce89f85
--- /dev/null
+++ b/hr_gratuity_settlement/views/gratuity_sequence.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ Open HRMS Gratuity
+ hr.gratuity
+ GRT
+ 3
+
+
+
+ Open HRMS Other Settlements
+ other.settlements
+ SETT
+ 3
+
+
+
+
diff --git a/hr_gratuity_settlement/views/other_settlements.xml b/hr_gratuity_settlement/views/other_settlements.xml
new file mode 100755
index 00000000..1f3c45d7
--- /dev/null
+++ b/hr_gratuity_settlement/views/other_settlements.xml
@@ -0,0 +1,112 @@
+
+
+
+
+ settlement.reason.form
+ settlement.reason
+
+
+
+
+
+
+ other.settlements.tree
+ other.settlements
+
+
+
+
+
+
+
+
+
+
+
+
+ other.settlements.form
+ other.settlements
+
+
+
+
+
+
+ Settlement Analysis
+ other.settlements
+ pivot
+
+
+
+
+
+
+
+
+
+
+
+
+ Settlements
+ other.settlements
+ form
+ tree,form
+
+
+
+
+
+
diff --git a/hr_insurance/README.rst b/hr_insurance/README.rst
new file mode 100644
index 00000000..d488a219
--- /dev/null
+++ b/hr_insurance/README.rst
@@ -0,0 +1,40 @@
+OHRMS Employee Insurance Management v12
+=======================================
+
+Employee insurance management for Open HRMS.
+
+Depends
+=======
+[hr] addon Odoo
+
+Tech
+====
+* [Python] - Models
+* [XML] - Odoo views
+
+Installation
+============
+- www.odoo.com/documentation/12.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: v11.0 - Treesa Maria Jude @ cybrosys, odoo@cybrosys.com
+ v12.0 - Kavya Raveendran
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/hr_insurance/__init__.py b/hr_insurance/__init__.py
new file mode 100644
index 00000000..1609385d
--- /dev/null
+++ b/hr_insurance/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
new file mode 100644
index 00000000..19edbcd8
--- /dev/null
+++ b/hr_insurance/__manifest__.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Treesa Maria Jude ()
+#
+# This program is free software: you can modify
+# it under the terms of the GNU Affero General Public License (AGPL) as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+###################################################################################
+
+{
+ 'name': 'Open HRMS Employee Insurance',
+ 'version': '12.0.1.0.0',
+ 'summary': """Employee Insurance Management for Open HRMS.""",
+ 'description': """Manages insurance amounts for employees to be deducted from salary""",
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': 'https://www.openhrms.com',
+ 'depends': [
+ 'base', 'hr', 'hr_payroll', 'hr_employee_updation',
+ ],
+ '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/doc/RELEASE_NOTES.md b/hr_insurance/doc/RELEASE_NOTES.md
new file mode 100644
index 00000000..f4225ce4
--- /dev/null
+++ b/hr_insurance/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 05.04.2019
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for OpenHrms Project
diff --git a/hr_insurance/models/__init__.py b/hr_insurance/models/__init__.py
new file mode 100644
index 00000000..d8310334
--- /dev/null
+++ b/hr_insurance/models/__init__.py
@@ -0,0 +1,25 @@
+# -*- 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
new file mode 100644
index 00000000..6e14d929
--- /dev/null
+++ b/hr_insurance/models/employee_insurance.py
@@ -0,0 +1,113 @@
+# -*- 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,date
+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()
+ current_date = datetime.strftime(current_datetime, "%Y-%m-%d ")
+ for i in self:
+ x = str(i.date_from)
+ y = str(i.date_to)
+ if x <= current_date:
+ if y >= current_date:
+ 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_date = datetime.now()
+ current_datetime = datetime.strftime(current_date, "%Y-%m-%d ")
+ for emp in self:
+ ins_amount = 0
+ for ins in emp.insurance:
+ x = str(ins.date_from)
+ y = str(ins.date_to)
+ if x < current_datetime:
+ if 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'
+
+ def get_inputs(self, contract_ids, date_from, date_to):
+ res = super(InsuranceRuleInput, self).get_inputs(contract_ids, date_from, date_to)
+ contract_obj = self.env['hr.contract']
+ for i in contract_ids:
+ if contract_ids[0]:
+ emp_id = contract_obj.browse(i[0].id).employee_id
+ for result in res:
+ if emp_id.deduced_amount_per_month != 0:
+ if 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
new file mode 100644
index 00000000..0b0b0786
--- /dev/null
+++ b/hr_insurance/models/policy_details.py
@@ -0,0 +1,33 @@
+# -*- 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
new file mode 100644
index 00000000..e96c9cb8
--- /dev/null
+++ b/hr_insurance/security/hr_insurance_security.xml
@@ -0,0 +1,16 @@
+
+
+
+ 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
new file mode 100644
index 00000000..030098bd
--- /dev/null
+++ b/hr_insurance/security/ir.model.access.csv
@@ -0,0 +1,8 @@
+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
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/hr_insurance/static/description/HRMS-BUTTON.png differ
diff --git a/hr_insurance/static/description/banner.jpg b/hr_insurance/static/description/banner.jpg
new file mode 100644
index 00000000..f64af7d1
Binary files /dev/null and b/hr_insurance/static/description/banner.jpg differ
diff --git a/hr_insurance/static/description/cybro-service.png b/hr_insurance/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/hr_insurance/static/description/cybro-service.png differ
diff --git a/hr_insurance/static/description/cybro_logo.png b/hr_insurance/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/hr_insurance/static/description/cybro_logo.png differ
diff --git a/hr_insurance/static/description/icon.png b/hr_insurance/static/description/icon.png
new file mode 100644
index 00000000..b65b2782
Binary files /dev/null and b/hr_insurance/static/description/icon.png differ
diff --git a/hr_insurance/static/description/index.html b/hr_insurance/static/description/index.html
new file mode 100644
index 00000000..ef076b60
--- /dev/null
+++ b/hr_insurance/static/description/index.html
@@ -0,0 +1,351 @@
+
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Helps to add employee insurance details
+ HR Manager can add insurance payment to Payslips
+ Helps to manage installment of the insurance
+
+
+
+
+
+
+
+
+
diff --git a/hr_leave_request_aliasing/README.md b/hr_leave_request_aliasing/README.md
new file mode 100755
index 00000000..bbebcea8
--- /dev/null
+++ b/hr_leave_request_aliasing/README.md
@@ -0,0 +1,25 @@
+Open HRMS Leave Request Aliasing
+--------------------------------
+Supporting Addon for Open HRMS, Allows You To Create Leave Request Automatically From Incoming Emails.
+
+Connect with experts
+--------------------
+
+If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys.
+
+Technical Notes
+---------------
+
+Here you need to send leave request through email with the following rules.
+* You must send leave request through your registered email id.
+* Mail subject must be start with 'LEAVE REQUEST '
+* Mail body must contain date as per given format (%d/%m/%Y)
+
+Contacts
+--------
+info - info@cybrosys.com
+Jesni Banu - jesni@cybrosys.in
+
+Website:
+https://www.openhrms.com
+https://www.cybrosys.com
diff --git a/hr_leave_request_aliasing/__init__.py b/hr_leave_request_aliasing/__init__.py
new file mode 100755
index 00000000..b579ce91
--- /dev/null
+++ b/hr_leave_request_aliasing/__init__.py
@@ -0,0 +1,25 @@
+# -*- 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
new file mode 100755
index 00000000..00a8a9ee
--- /dev/null
+++ b/hr_leave_request_aliasing/__manifest__.py
@@ -0,0 +1,45 @@
+# -*- 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': '12.0.1.0.0',
+ 'summary': """Allows You To Create Leave Request Automatically From Incoming Mails""",
+ 'description': 'This module allows you to create leave request directly from incoming mails.',
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ '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
new file mode 100755
index 00000000..c21ce166
--- /dev/null
+++ b/hr_leave_request_aliasing/data/web_planner_data.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+ Setup
+
+
+ Get Mobile
+
+
+ Your email gateway is not configured. Please configure your email
+ gateway from the Settings app, menu General Settings.
+
+
+ Once your email gateway is configured, come back to this screen
+ to setup the next steps.
+
+
+
+
+ To create leave request by email, send leave request by email with the following
+ information:
+
+
+
+
From: Your Email
+
Your Email Address
+
To:
+
@
+
Subject:
+
LEAVE REQUEST Free Description with Date From: and Date To:
+
+
+
+ The LEAVE REQUEST is mandatory and should be in the
+ subject of your email. This
+ will root the leave request automatically on your
+ Odoo.
+
+ Also you need to set Date From: and Date To:
+ at the end of the body of your email.
+
+
+ Note: Set the same email address on your employee form(working email) than
+ the one you use are your "From:". Otherwise, your
+ leave request will not be accepted by email.
+
+
+
+
+
+
+ End
+
+
+
+
+
+
Congratulations, you're done!
+
We hope this feature helped you manage your leave request efficiently.
+
Don't hesitate to send us an email to describe your experience or to suggest improvements!
+
+
Have a wonderful day, - Cybrosys
+
+
+
+
+
+
+
+ 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
new file mode 100755
index 00000000..d8cbf249
--- /dev/null
+++ b/hr_leave_request_aliasing/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 24.03.2018
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for Open HRMS Project
diff --git a/hr_leave_request_aliasing/models/__init__.py b/hr_leave_request_aliasing/models/__init__.py
new file mode 100755
index 00000000..3d56c9b5
--- /dev/null
+++ b/hr_leave_request_aliasing/models/__init__.py
@@ -0,0 +1,27 @@
+# -*- 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
new file mode 100755
index 00000000..c465b169
--- /dev/null
+++ b/hr_leave_request_aliasing/models/leave_request_alias.py
@@ -0,0 +1,73 @@
+# -*- 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.leave'
+
+ @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
new file mode 100755
index 00000000..58df9c67
--- /dev/null
+++ b/hr_leave_request_aliasing/models/res_config.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Jesni Banu ()
+#
+# This program is free software: you can modify
+# it under the terms of the GNU Affero General Public License (AGPL) as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+###################################################################################
+from odoo import api, fields, models
+
+
+class HrLeaveConfigSettings(models.TransientModel):
+ _inherit = 'res.config.settings'
+
+ alias_prefix = fields.Char(string='Default Alias Name for Leave', help='Default Alias Name for Leave')
+ alias_domain = fields.Char(string='Alias Domain', help='Default Alias Domain for Leave',
+ default=lambda self: self.env["ir.config_parameter"].get_param("mail.catchall.domain"))
+
+ def set_values(self):
+ super(HrLeaveConfigSettings, self).set_values()
+ set_param = self.env['ir.config_parameter'].set_param
+ set_param('alias_prefix', self.alias_prefix)
+ set_param('alias_domain', self.alias_domain )
+
+ @api.model
+ def get_values(self):
+ res = super(HrLeaveConfigSettings, self).get_values()
+ get_param = self.env['ir.config_parameter'].sudo().get_param
+ res.update(
+ alias_prefix=get_param('alias_prefix', default=''),
+ alias_domain=get_param('alias_domain', default=''),
+ )
+ return res
+
diff --git a/hr_leave_request_aliasing/models/web_planner.py b/hr_leave_request_aliasing/models/web_planner.py
new file mode 100755
index 00000000..e62a026d
--- /dev/null
+++ b/hr_leave_request_aliasing/models/web_planner.py
@@ -0,0 +1,44 @@
+# -*- 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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/HRMS-BUTTON.png differ
diff --git a/hr_leave_request_aliasing/static/description/banner.jpg b/hr_leave_request_aliasing/static/description/banner.jpg
new file mode 100755
index 00000000..06286d84
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/banner.jpg differ
diff --git a/hr_leave_request_aliasing/static/description/cybro-service.png b/hr_leave_request_aliasing/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/cybro-service.png differ
diff --git a/hr_leave_request_aliasing/static/description/cybro_logo.png b/hr_leave_request_aliasing/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/cybro_logo.png differ
diff --git a/hr_leave_request_aliasing/static/description/icon.png b/hr_leave_request_aliasing/static/description/icon.png
new file mode 100755
index 00000000..2ebe3a20
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/icon.png differ
diff --git a/hr_leave_request_aliasing/static/description/index.html b/hr_leave_request_aliasing/static/description/index.html
new file mode 100755
index 00000000..98e89f2a
--- /dev/null
+++ b/hr_leave_request_aliasing/static/description/index.html
@@ -0,0 +1,348 @@
+
+
+
+
+ Open HRMS Leave Request Aliasing
+
+
+ Creating Leave Request, Automatically From Incoming Emails
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Automation on Leaves Request Mails.
+ Option to Set Aliasing Domain Separately for Leave Request.
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ 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'.
+
+
+
+
+
diff --git a/hr_leave_request_aliasing/static/description/mail_aliasing.png b/hr_leave_request_aliasing/static/description/mail_aliasing.png
new file mode 100755
index 00000000..958acd2b
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/mail_aliasing.png differ
diff --git a/hr_leave_request_aliasing/static/description/oh_icon.png b/hr_leave_request_aliasing/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/oh_icon.png differ
diff --git a/hr_leave_request_aliasing/static/description/open-hrms-leave-request.png b/hr_leave_request_aliasing/static/description/open-hrms-leave-request.png
new file mode 100755
index 00000000..958acd2b
Binary files /dev/null and b/hr_leave_request_aliasing/static/description/open-hrms-leave-request.png 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
new file mode 100755
index 00000000..f0510233
--- /dev/null
+++ b/hr_leave_request_aliasing/static/src/js/web_planner_hr_leave.js
@@ -0,0 +1,6 @@
+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
new file mode 100755
index 00000000..46bd5462
--- /dev/null
+++ b/hr_leave_request_aliasing/views/hr_leave_template.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hr_leave_request_aliasing/views/leave_request_alias_view.xml b/hr_leave_request_aliasing/views/leave_request_alias_view.xml
new file mode 100755
index 00000000..e90d12df
--- /dev/null
+++ b/hr_leave_request_aliasing/views/leave_request_alias_view.xml
@@ -0,0 +1,9 @@
+
+
+
+ leave
+
+
+ employees
+
+
diff --git a/hr_leave_request_aliasing/views/res_config_views.xml b/hr_leave_request_aliasing/views/res_config_views.xml
new file mode 100755
index 00000000..669b1a3e
--- /dev/null
+++ b/hr_leave_request_aliasing/views/res_config_views.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ Configure Leave
+ res.config.settings
+
+
+
+
+
+
Leaves
+
+
+
+
+
+ You can setup a generic email alias to create
+ incoming leave request easily. Write an email with the desired
+ format to create leave request in one click.
+ Format:- Start subject with 'LEAVE REQUEST'. After your mail content mention
+ 'Date From:' and 'Date To:'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Leaves Config
+ ir.actions.act_window
+ res.config.settings
+ form
+ inline
+ {'module' : 'hr_leave_request_aliasing'}
+
+
+
+
+
diff --git a/hr_multi_company/README.md b/hr_multi_company/README.md
new file mode 100755
index 00000000..92115909
--- /dev/null
+++ b/hr_multi_company/README.md
@@ -0,0 +1,17 @@
+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
new file mode 100755
index 00000000..9c6d6e05
--- /dev/null
+++ b/hr_multi_company/__init__.py
@@ -0,0 +1,25 @@
+# -*- 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
new file mode 100755
index 00000000..470924bb
--- /dev/null
+++ b/hr_multi_company/__manifest__.py
@@ -0,0 +1,43 @@
+# -*- 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': '12.0.1.0.0',
+ 'summary': """Enables Multi-Company""",
+ 'description': 'This module enables multi company features',
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'hr_contract', 'hr_payroll', 'hr_expense', '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
new file mode 100755
index 00000000..7ee93a11
--- /dev/null
+++ b/hr_multi_company/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 30.03.2018
+#### Version 11.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
new file mode 100755
index 00000000..0e2cb355
--- /dev/null
+++ b/hr_multi_company/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
new file mode 100755
index 00000000..6d8a492d
--- /dev/null
+++ b/hr_multi_company/models/hr_multi_company.py
@@ -0,0 +1,51 @@
+# -*- 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.leave'
+
+ 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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_multi_company/static/description/HRMS-BUTTON.png differ
diff --git a/hr_multi_company/static/description/banner.jpg b/hr_multi_company/static/description/banner.jpg
new file mode 100755
index 00000000..08b67a19
Binary files /dev/null and b/hr_multi_company/static/description/banner.jpg differ
diff --git a/hr_multi_company/static/description/cybro-service.png b/hr_multi_company/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_multi_company/static/description/cybro-service.png differ
diff --git a/hr_multi_company/static/description/cybro_logo.png b/hr_multi_company/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_multi_company/static/description/cybro_logo.png differ
diff --git a/hr_multi_company/static/description/icon.png b/hr_multi_company/static/description/icon.png
new file mode 100755
index 00000000..1dbe70d0
Binary files /dev/null and b/hr_multi_company/static/description/icon.png differ
diff --git a/hr_multi_company/static/description/index.html b/hr_multi_company/static/description/index.html
new file mode 100755
index 00000000..9eac0941
--- /dev/null
+++ b/hr_multi_company/static/description/index.html
@@ -0,0 +1,357 @@
+
+
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+
+ Features
+
+
+
+ Managing multi company.
+
+
+ Handle multiple companies separately.
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ The employee's details in every Open HRMS module shows the company that the employee belongs to.
+
+
+
+
+
diff --git a/hr_multi_company/static/description/oh_icon.png b/hr_multi_company/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/hr_multi_company/static/description/oh_icon.png differ
diff --git a/hr_multi_company/static/description/open-hrms-multi-company-1.png b/hr_multi_company/static/description/open-hrms-multi-company-1.png
new file mode 100644
index 00000000..8445d7b0
Binary files /dev/null and b/hr_multi_company/static/description/open-hrms-multi-company-1.png differ
diff --git a/hr_multi_company/static/description/open-hrms-multi-company-2.png b/hr_multi_company/static/description/open-hrms-multi-company-2.png
new file mode 100644
index 00000000..28bd28ac
Binary files /dev/null and b/hr_multi_company/static/description/open-hrms-multi-company-2.png differ
diff --git a/hr_multi_company/views/hr_company_view.xml b/hr_multi_company/views/hr_company_view.xml
new file mode 100755
index 00000000..cca6e8e3
--- /dev/null
+++ b/hr_multi_company/views/hr_company_view.xml
@@ -0,0 +1,57 @@
+
+
+
+ hr.holidays.form.view1
+ hr.leave
+
+
+
+
+
+
+
+
+
+ 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
new file mode 100755
index 00000000..a9dfdca8
--- /dev/null
+++ b/hr_multi_company/views/multi_company_view.xml
@@ -0,0 +1,72 @@
+
+
+
+ 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/README.rst b/hr_reminder/README.rst
new file mode 100755
index 00000000..2fe35cf9
--- /dev/null
+++ b/hr_reminder/README.rst
@@ -0,0 +1,39 @@
+Open HRMS Reminders Todo V11
+============================
+
+HR Reminder For OHRMS
+
+Depends
+=======
+[hr] addon Odoo
+
+Tech
+====
+* [Python] - Models
+* [XML] - Odoo views
+
+Installation
+============
+- www.odoo.com/documentation/10.0/setup/install.html
+- Install our custom addon
+
+
+Bug Tracker
+===========
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
+
+Credits
+=======
+* Cybrosys Techno Solutions
+
+Author
+------
+
+Developer: Treesa Maria Jude @ cybrosys, treesa@cybrosys.in
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/hr_reminder/__init__.py b/hr_reminder/__init__.py
new file mode 100755
index 00000000..a84ea577
--- /dev/null
+++ b/hr_reminder/__init__.py
@@ -0,0 +1,25 @@
+# -*- 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
new file mode 100755
index 00000000..99a12578
--- /dev/null
+++ b/hr_reminder/__manifest__.py
@@ -0,0 +1,45 @@
+# -*- 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': '12.0.1.0.0',
+ 'category': 'Generic Modules/Human Resources',
+ 'summary': 'HR Reminder For OHRMS',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ '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
new file mode 100755
index 00000000..948e84ff
--- /dev/null
+++ b/hr_reminder/controllers/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
new file mode 100755
index 00000000..bfb960de
--- /dev/null
+++ b/hr_reminder/controllers/main.py
@@ -0,0 +1,51 @@
+# -*- 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
new file mode 100755
index 00000000..4419d8ab
--- /dev/null
+++ b/hr_reminder/controllers/time_reminder.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+
+import werkzeug
+
+from odoo.api import Environment
+import odoo.http as http
+
+from odoo.http import request
+from odoo import SUPERUSER_ID
+from odoo import registry as registry_get
+
+
+class CalendarController(http.Controller):
+
+ @http.route('/calendar/meeting/accept', type='http', auth="calendar")
+ def accept(self, db, token, action, id, **kwargs):
+ registry = registry_get(db)
+ with registry.cursor() as cr:
+ env = Environment(cr, SUPERUSER_ID, {})
+ attendee = env['calendar.attendee'].search([('access_token', '=', token), ('state', '!=', 'accepted')])
+ if attendee:
+ attendee.do_accept()
+ return self.view(db, token, action, id, view='form')
+
+ @http.route('/calendar/meeting/decline', type='http', auth="calendar")
+ def declined(self, db, token, action, id):
+ registry = registry_get(db)
+ with registry.cursor() as cr:
+ env = Environment(cr, SUPERUSER_ID, {})
+ attendee = env['calendar.attendee'].search([('access_token', '=', token), ('state', '!=', 'declined')])
+ if attendee:
+ attendee.do_decline()
+ return self.view(db, token, action, id, view='form')
+
+ @http.route('/calendar/meeting/view', type='http', auth="calendar")
+ def view(self, db, token, action, id, view='calendar'):
+ registry = registry_get(db)
+ with registry.cursor() as cr:
+ # Since we are in auth=none, create an env with SUPERUSER_ID
+ env = Environment(cr, SUPERUSER_ID, {})
+ attendee = env['calendar.attendee'].search([('access_token', '=', token)])
+ timezone = attendee.partner_id.tz
+ lang = attendee.partner_id.lang or 'en_US'
+ event = env['calendar.event'].with_context(tz=timezone, lang=lang).browse(int(id))
+
+ # If user is logged, redirect to form view of event
+ # otherwise, display the simplifyed web page with event informations
+ if request.session.uid:
+ return werkzeug.utils.redirect('/web?db=%s#id=%s&view_type=form&model=calendar.event' % (db, id))
+
+ # NOTE : we don't use request.render() since:
+ # - we need a template rendering which is not lazy, to render before cursor closing
+ # - we need to display the template in the language of the user (not possible with
+ # request.render())
+ return env['ir.ui.view'].with_context(lang=lang).render_template(
+ 'calendar.invitation_page_anonymous', {
+ 'event': event,
+ 'attendee': attendee,
+ })
+
+ # Function used, in RPC to check every 5 minutes, if notification to do for an event or not
+ @http.route('/calendar/notify', type='json', auth="user")
+ def notify(self):
+ return request.env['calendar.alarm_manager'].get_next_notif()
+
+ @http.route('/calendar/notify_ack', type='json', auth="user")
+ def notify_ack(self, type=''):
+ return request.env['res.partner']._set_calendar_last_notif_ack()
diff --git a/hr_reminder/docs/RELEASE_NOTES.md b/hr_reminder/docs/RELEASE_NOTES.md
new file mode 100755
index 00000000..cd7da7a5
--- /dev/null
+++ b/hr_reminder/docs/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module hr_reminder
+
+#### 21.04.2018
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for OpenHrms Project
diff --git a/hr_reminder/models/__init__.py b/hr_reminder/models/__init__.py
new file mode 100755
index 00000000..88311d89
--- /dev/null
+++ b/hr_reminder/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
new file mode 100755
index 00000000..e9a6f38a
--- /dev/null
+++ b/hr_reminder/models/hr_reminder.py
@@ -0,0 +1,77 @@
+# -*- 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
new file mode 100755
index 00000000..2650c4fa
--- /dev/null
+++ b/hr_reminder/security/hr_reminder_security.xml
@@ -0,0 +1,10 @@
+
+
+
+ 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
new file mode 100755
index 00000000..46fc9f5d
--- /dev/null
+++ b/hr_reminder/security/ir.model.access.csv
@@ -0,0 +1,5 @@
+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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_reminder/static/description/HRMS-BUTTON.png differ
diff --git a/hr_reminder/static/description/banner.jpg b/hr_reminder/static/description/banner.jpg
new file mode 100755
index 00000000..7579d32e
Binary files /dev/null and b/hr_reminder/static/description/banner.jpg differ
diff --git a/hr_reminder/static/description/cybro-service.png b/hr_reminder/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_reminder/static/description/cybro-service.png differ
diff --git a/hr_reminder/static/description/cybro_logo.png b/hr_reminder/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_reminder/static/description/cybro_logo.png differ
diff --git a/hr_reminder/static/description/icon.png b/hr_reminder/static/description/icon.png
new file mode 100755
index 00000000..cf84f5d5
Binary files /dev/null and b/hr_reminder/static/description/icon.png differ
diff --git a/hr_reminder/static/description/index.html b/hr_reminder/static/description/index.html
new file mode 100755
index 00000000..7c8787b5
--- /dev/null
+++ b/hr_reminder/static/description/index.html
@@ -0,0 +1,391 @@
+
+
+ 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...).
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Set the reminder for different models.
+ Different types of search options
+
+
→ 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).
+
+
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+ Set your reminders for any model and the corresponding date field.
+ Also this module allows different methods to search.
+
+
+
+
+
+
+
+ Setting the search by today.
+
+
+
+
+
+
+
+ Setting the search by date.
+
+
+
+
+
+
+
+ Setting the search by period.
+
+
+
+
+
+
+
+ Select the Reminder from the list of Reminders.
+
+
+ Employee Resignation is a component of Open HRMS suit. This module manages employee resignation process.
+ Employee can fill and send resignation request from their portal and higher level officers can take
+ appropriate actions on it.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Employee will create his/her resignation request
+ Higher level officers can approve or reject the request
+
+
+
+
+
+
+
+
+
+
diff --git a/hr_reward_warning/README.md b/hr_reward_warning/README.md
new file mode 100755
index 00000000..6a66b187
--- /dev/null
+++ b/hr_reward_warning/README.md
@@ -0,0 +1,17 @@
+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 - odoo@cybrosys.com
+
+Website:
+https://www.openhrms.com
+https://www.cybrosys.com
diff --git a/hr_reward_warning/__init__.py b/hr_reward_warning/__init__.py
new file mode 100755
index 00000000..0f9b4903
--- /dev/null
+++ b/hr_reward_warning/__init__.py
@@ -0,0 +1,23 @@
+# -*- 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
new file mode 100755
index 00000000..16b12e60
--- /dev/null
+++ b/hr_reward_warning/__manifest__.py
@@ -0,0 +1,44 @@
+# -*- 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': '12.0.2.0.1',
+ 'summary': """Managing Official Announcements""",
+ 'description': 'This module helps you to manage hr official announcements',
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'mail', 'hr'],
+ '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
new file mode 100755
index 00000000..7b86d32a
--- /dev/null
+++ b/hr_reward_warning/doc/RELEASE_NOTES.md
@@ -0,0 +1,14 @@
+## Module
+
+#### 21.04.2018
+#### Version 12.0.1.0.0
+##### ADD
+- Initial commit for Open HRMS Project
+
+#### 13.03.2019
+#### Version 12.0.2.0.0
+##### UPDT
+- Separate sequences for general and other announcements
+- Employee/ Department/ Job position wise announcements
+- Extra fields in announcement
+- Removed the done state from announcement
diff --git a/hr_reward_warning/models/__init__.py b/hr_reward_warning/models/__init__.py
new file mode 100755
index 00000000..e14076a2
--- /dev/null
+++ b/hr_reward_warning/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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
new file mode 100755
index 00000000..a3ea794e
--- /dev/null
+++ b/hr_reward_warning/models/hr_employee.py
@@ -0,0 +1,110 @@
+# -*- 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 HrAnnouncements(models.Model):
+ _inherit = 'hr.employee'
+
+ @api.multi
+ def _announcement_count(self):
+ now = datetime.now()
+ now_date = now.date()
+ for rec in self:
+ ann_ids_general = self.env['hr.announcement'].sudo().search([('is_announcement', '=', True),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_emp = self.env['hr.announcement'].search([('employee_ids', 'in', [rec.id]),
+ ('announcement_type', '=', 'employee'),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_dep = self.env['hr.announcement'].sudo().search([('department_ids', 'in', [rec.department_id.id]),
+ ('announcement_type', '=', 'department'),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_job = self.env['hr.announcement'].sudo().search([('position_ids', 'in', [rec.job_id.id]),
+ ('announcement_type', '=', 'job_position'),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ rec.announcement_count = len(ann_ids_general) + len(ann_ids_emp) + len(ann_ids_dep) + len(ann_ids_job)
+
+ @api.multi
+ def announcement_view(self):
+ now = datetime.now()
+ now_date = now.date()
+ for rec in self:
+ ann_ids_general = self.env['hr.announcement'].sudo().search([('is_announcement', '=', True),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_emp = self.env['hr.announcement'].sudo().search([('announcement_type', '=', 'employee'),
+ ('employee_ids', 'in', [rec.id]),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_dep = self.env['hr.announcement'].sudo().search([('announcement_type', '=', 'department'),
+ ('department_ids', 'in', [rec.department_id.id]),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+ ann_ids_job = self.env['hr.announcement'].sudo().search([('announcement_type', '=', 'job_position'),
+ ('position_ids', 'in', [rec.job_id.id]),
+ ('state', 'in', ('approved', 'done')),
+ ('date_start', '<=', now_date),
+ ('date_end', '>=', now_date)])
+
+ ann_obj = ann_ids_general.ids + ann_ids_emp.ids + ann_ids_job.ids + ann_ids_dep.ids
+ ann_ids = []
+ for each in ann_obj:
+ ann_ids.append(each)
+ 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')
diff --git a/hr_reward_warning/models/hr_warning.py b/hr_reward_warning/models/hr_warning.py
new file mode 100755
index 00000000..fb6c2d80
--- /dev/null
+++ b/hr_reward_warning/models/hr_warning.py
@@ -0,0 +1,79 @@
+# -*- 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, _
+from odoo.exceptions import ValidationError
+
+
+class HrAnnouncementTable(models.Model):
+ _name = 'hr.announcement'
+ _description = 'HR Announcement'
+ _inherit = ['mail.thread', 'mail.activity.mixin']
+
+ name = fields.Char(string='Code No:')
+ announcement_reason = fields.Text(string='Title', states={'draft': [('readonly', False)]}, required=True, readonly=True)
+ state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'),
+ ('approved', 'Approved'), ('rejected', 'Refused')],
+ string='Status', default='draft',
+ track_visibility='always')
+ requested_date = fields.Date(string='Requested Date', default=datetime.now().strftime('%Y-%m-%d'))
+ attachment_id = fields.Many2many('ir.attachment', 'doc_warning_rel', 'doc_id', 'attach_id4',
+ string="Attachment", help='You can attach the copy of your Letter')
+ company_id = fields.Many2one('res.company', string='Company',
+ default=lambda self: self.env.user.company_id, readonly=True,)
+ is_announcement = fields.Boolean(string='Is general Announcement?')
+ announcement_type = fields.Selection([('employee', 'By Employee'), ('department', 'By Department'), ('job_position', 'By Job Position')])
+ employee_ids = fields.Many2many('hr.employee', 'hr_employee_announcements', 'announcement', 'employee',
+ string='Employees')
+ department_ids = fields.Many2many('hr.department', 'hr_department_announcements', 'announcement', 'department',
+ string='Departments')
+ position_ids = fields.Many2many('hr.job', 'hr_job_position_announcements', 'announcement', 'job_position',
+ string='Job Positions')
+ announcement = fields.Html(string='Letter', states={'draft': [('readonly', False)]}, readonly=True)
+ date_start = fields.Date(string='Start Date', default=fields.Date.today(), required=True)
+ date_end = fields.Date(string='End Date', default=fields.Date.today(), required=True)
+
+ @api.multi
+ def reject(self):
+ self.state = 'rejected'
+
+ @api.multi
+ def approve(self):
+ self.state = 'approved'
+
+ @api.multi
+ def sent(self):
+ self.state = 'to_approve'
+
+ @api.constrains('date_start', 'date_end')
+ def validation(self):
+ if self.date_start > self.date_end:
+ raise ValidationError("Start date must be less than End Date")
+
+ @api.model
+ def create(self, vals):
+ if vals.get('is_announcement'):
+ vals['name'] = self.env['ir.sequence'].next_by_code('hr.announcement.general')
+ else:
+ 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
new file mode 100755
index 00000000..49d676c9
--- /dev/null
+++ b/hr_reward_warning/security/ir.model.access.csv
@@ -0,0 +1,4 @@
+"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
new file mode 100755
index 00000000..c8f6db1f
--- /dev/null
+++ b/hr_reward_warning/security/reward_security.xml
@@ -0,0 +1,9 @@
+
+
+
+ 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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/hr_reward_warning/static/description/HRMS-BUTTON.png differ
diff --git a/hr_reward_warning/static/description/announcement_icon.png b/hr_reward_warning/static/description/announcement_icon.png
new file mode 100644
index 00000000..b6b97367
Binary files /dev/null and b/hr_reward_warning/static/description/announcement_icon.png differ
diff --git a/hr_reward_warning/static/description/banner.jpg b/hr_reward_warning/static/description/banner.jpg
new file mode 100755
index 00000000..61924dab
Binary files /dev/null and b/hr_reward_warning/static/description/banner.jpg differ
diff --git a/hr_reward_warning/static/description/cybro-service.png b/hr_reward_warning/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/hr_reward_warning/static/description/cybro-service.png differ
diff --git a/hr_reward_warning/static/description/cybro_logo.png b/hr_reward_warning/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/hr_reward_warning/static/description/cybro_logo.png differ
diff --git a/hr_reward_warning/static/description/hr_reward.png b/hr_reward_warning/static/description/hr_reward.png
new file mode 100755
index 00000000..184ee961
Binary files /dev/null and b/hr_reward_warning/static/description/hr_reward.png differ
diff --git a/hr_reward_warning/static/description/icon.png b/hr_reward_warning/static/description/icon.png
new file mode 100755
index 00000000..81e5258c
Binary files /dev/null and b/hr_reward_warning/static/description/icon.png differ
diff --git a/hr_reward_warning/static/description/index.html b/hr_reward_warning/static/description/index.html
new file mode 100755
index 00000000..6c2e64ab
--- /dev/null
+++ b/hr_reward_warning/static/description/index.html
@@ -0,0 +1,348 @@
+
+
+
+
+
+
diff --git a/hr_theme/README.md b/hr_theme/README.md
new file mode 100644
index 00000000..c4b101b7
--- /dev/null
+++ b/hr_theme/README.md
@@ -0,0 +1,44 @@
+Open HRMS Theme
+===============
+
+Theme for Open HRMS.
+
+Depends
+=======
+[web] addon Odoo
+
+Tech
+====
+* [XML] - Odoo views
+
+Installation
+============
+- www.odoo.com/documentation/12.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: v11 - Avinash Nk
+ v11 -Sanjith Rashin
+ v12 - Milind Mohan P
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/hr_theme/__init__.py b/hr_theme/__init__.py
new file mode 100644
index 00000000..23750fee
--- /dev/null
+++ b/hr_theme/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Avinash Nk ()
+#
+# 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 .
+#
+###################################################################################
diff --git a/hr_theme/__manifest__.py b/hr_theme/__manifest__.py
new file mode 100644
index 00000000..b813f5bc
--- /dev/null
+++ b/hr_theme/__manifest__.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of Open HRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Avinash Nk ()
+#
+# 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 Theme',
+ 'version': '12.0.1.0.0',
+ 'summary': """Curtain Raiser of Open HRMS.""",
+ 'description': """Open HRMS all set in new colour theme of blues and whites totaling to a new experience""",
+ 'category': 'Themes',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['web', 'web_responsive'],
+ 'data': [
+ 'views/open_hrms_theme.xml',
+ ],
+ 'demo': [],
+ 'images': ['static/description/banner.jpg'],
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'auto_install': False,
+ 'application': False,
+}
diff --git a/hr_theme/doc/RELEASE_NOTES.md b/hr_theme/doc/RELEASE_NOTES.md
new file mode 100644
index 00000000..495bbcf3
--- /dev/null
+++ b/hr_theme/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 30.03.2019
+#### Version 12.0.1.0.0
+##### ADD
+- Initial commit for Open Hrms Project
diff --git a/hr_theme/static/description/HRMS-BUTTON.png b/hr_theme/static/description/HRMS-BUTTON.png
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/hr_theme/static/description/HRMS-BUTTON.png differ
diff --git a/hr_theme/static/description/banner.jpg b/hr_theme/static/description/banner.jpg
new file mode 100644
index 00000000..367c38d2
Binary files /dev/null and b/hr_theme/static/description/banner.jpg differ
diff --git a/hr_theme/static/description/cybro-service.png b/hr_theme/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/hr_theme/static/description/cybro-service.png differ
diff --git a/hr_theme/static/description/cybro_logo.png b/hr_theme/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/hr_theme/static/description/cybro_logo.png differ
diff --git a/hr_theme/static/description/icon.png b/hr_theme/static/description/icon.png
new file mode 100644
index 00000000..e41f5650
Binary files /dev/null and b/hr_theme/static/description/icon.png differ
diff --git a/hr_theme/static/description/index.html b/hr_theme/static/description/index.html
new file mode 100644
index 00000000..1162bef5
--- /dev/null
+++ b/hr_theme/static/description/index.html
@@ -0,0 +1,319 @@
+
+
+ Blessed are they who see beautiful things in humble places. Head to new Open HRMS website all set in blue
+ and white color tone giving visual bliss to the eyes and its redefined user interface ensuring a clear and concise outlook on human resource.
+
+ Human Resource Departments have a lot to manage and volume to track with reports ever growing.
+ Fortunately, technologies provide elegant solutions to track and monitor every essential Human Resource activities.
+
+ Open HRMS HR Dashboard provides a visually engaging palate for seamless management of Human Resource functions.
+ It provides executives and employees the information they need. Open HRMS Dashboard comes intuitive and
+ interactive connecting every dots of your data like never before. With Open HRMS HR dashboard,
+ facilitates with various metrics helping easy to view, understand, and share data.
+ Experience the new kind of responsiveness with Open HRMS Dashboard.
+
+
+
+
+ Configuration
+
+
+ Need to install the external python dependency 'pandas'.
+
+
+
+
+
+
+
+ Features
+
+
+
+ Provides all essential tools to deliver real-time informations.
+
+
+
+ Employees quick access to their timesheets, company contracts and their board factor for analyzing their leave.
+
+
+ Managers to view employee division by departments from department wise employee graph.
+
+
+
+ Manager to view leave allocation requests, leaves for the day and month, job applications and finally approval of leaves after verification.
+
+
+
+
+
+ Screenshots
+
+
+
+ Open HRMS HR Dashboard provides you with all essential tools to deliver real-time information’s.
+
+
+
+
+
+
+ Open HRMS HR Dashboard gets you with monthly leave analysis of employees from various departments. Open HRMS HR Dashboard showcases the
+ department wise leave percentage for quick and easy understanding.
+
+
+
+
+
+
+ You will also able to see the monthly join/resign analysis and attrition rate analysis.
+
+
+
+
+
+
+ The HR Dashboard also gives a glimpse of the upcoming birthdays of employees creating the mood for celebration.
+ Also the upcoming events and announcements.
+ Open HRMS HR Dashboard facilitates each employee to log in and conduct their own leave analysis for the past six months.
+
+
+
+
+
diff --git a/hrms_dashboard/views/dashboard_views.xml b/hrms_dashboard/views/dashboard_views.xml
new file mode 100644
index 00000000..7ae1c0d4
--- /dev/null
+++ b/hrms_dashboard/views/dashboard_views.xml
@@ -0,0 +1,20 @@
+
+
+
+ Dashboard
+ hr_dashboard
+
+
+
+
+
+
+
+
+
+
+
diff --git a/oh_appraisal/README.rst b/oh_appraisal/README.rst
new file mode 100755
index 00000000..f8bf6c7c
--- /dev/null
+++ b/oh_appraisal/README.rst
@@ -0,0 +1,43 @@
+OHRMS Employee Appraisal v11
+============================
+
+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/__init__.py b/oh_appraisal/__init__.py
new file mode 100755
index 00000000..8ca69c8b
--- /dev/null
+++ b/oh_appraisal/__init__.py
@@ -0,0 +1,23 @@
+# -*- 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 .
+#
+###################################################################################
+from . import models
diff --git a/oh_appraisal/__manifest__.py b/oh_appraisal/__manifest__.py
new file mode 100755
index 00000000..3c1c6dbc
--- /dev/null
+++ b/oh_appraisal/__manifest__.py
@@ -0,0 +1,45 @@
+# -*- 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': '12.0.1.1.2',
+ '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': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', '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
new file mode 100755
index 00000000..c5a986e3
--- /dev/null
+++ b/oh_appraisal/data/hr_appraisal_stages.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ To Start
+ 1
+
+
+
+ Sent Mail
+ 2
+
+
+
+ Done
+ 3
+
+
+
+ Cancel
+ 4
+
+
+
diff --git a/oh_appraisal/doc/RELEASE_NOTES.md b/oh_appraisal/doc/RELEASE_NOTES.md
new file mode 100755
index 00000000..ae8f2309
--- /dev/null
+++ b/oh_appraisal/doc/RELEASE_NOTES.md
@@ -0,0 +1,21 @@
+## Module
+
+#### 21.04.2018
+#### Version 12.0.1.0.0
+##### ADD
+- Initial commit for Open HRMS Project
+
+#### 08/11/2018
+#### Version 12.0.1.0.1
+##### FIX
+- Fixed TypeError Git Issue #15
+
+#### 22/10/2019
+#### Version 12.0.1.1.1
+##### FIX
+- Access Right Issue
+
+#### 25/10/2019
+#### Version 12.0.1.1.2
+##### FIX
+- Bug Fixed
diff --git a/oh_appraisal/models/__init__.py b/oh_appraisal/models/__init__.py
new file mode 100755
index 00000000..314070ca
--- /dev/null
+++ b/oh_appraisal/models/__init__.py
@@ -0,0 +1,23 @@
+# -*- 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 .
+#
+###################################################################################
+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
new file mode 100755
index 00000000..8abcb9ea
--- /dev/null
+++ b/oh_appraisal/models/hr_appraisal_form.py
@@ -0,0 +1,193 @@
+# -*- 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 .
+#
+###################################################################################
+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", help="After sending survey link,you can"
+ " schedule final interview date")
+ 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.Datetime("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
new file mode 100755
index 00000000..7cb3b19f
--- /dev/null
+++ b/oh_appraisal/models/hr_appraisal_survey.py
@@ -0,0 +1,29 @@
+# -*- 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 .
+#
+###################################################################################
+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
new file mode 100755
index 00000000..aa315792
--- /dev/null
+++ b/oh_appraisal/security/hr_appraisal_security.xml
@@ -0,0 +1,56 @@
+
+
+
+ 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
new file mode 100755
index 00000000..1b64fc76
--- /dev/null
+++ b/oh_appraisal/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/oh_appraisal/static/description/HRMS-BUTTON.png differ
diff --git a/oh_appraisal/static/description/appraisal_icon.png b/oh_appraisal/static/description/appraisal_icon.png
new file mode 100644
index 00000000..25615fc5
Binary files /dev/null and b/oh_appraisal/static/description/appraisal_icon.png differ
diff --git a/oh_appraisal/static/description/banner.jpg b/oh_appraisal/static/description/banner.jpg
new file mode 100755
index 00000000..0823d44d
Binary files /dev/null and b/oh_appraisal/static/description/banner.jpg differ
diff --git a/oh_appraisal/static/description/cybro-service.png b/oh_appraisal/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/oh_appraisal/static/description/cybro-service.png differ
diff --git a/oh_appraisal/static/description/cybro_logo.png b/oh_appraisal/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/oh_appraisal/static/description/cybro_logo.png differ
diff --git a/oh_appraisal/static/description/icon.png b/oh_appraisal/static/description/icon.png
new file mode 100755
index 00000000..b4f716e9
Binary files /dev/null and b/oh_appraisal/static/description/icon.png differ
diff --git a/oh_appraisal/static/description/index.html b/oh_appraisal/static/description/index.html
new file mode 100755
index 00000000..7218d6b7
--- /dev/null
+++ b/oh_appraisal/static/description/index.html
@@ -0,0 +1,385 @@
+
+
+
+ Employee Appraisal
+
+
+ Roll out appraisal plans and get the best of your workforce.
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+
+ Features
+
+
+
+ Multiple appraisal methods like self-appraisal, colleague evaluation.
+ Create appraisal plans using interviews, questionnaires and feedback forms.
+
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+
+ 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
new file mode 100755
index 00000000..495a3e1c
--- /dev/null
+++ b/oh_appraisal/views/hr_appraisal_survey_views.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ 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
new file mode 100644
index 00000000..13bac502
--- /dev/null
+++ b/oh_employee_check_list/README.md
@@ -0,0 +1,23 @@
+Open HRMS 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 - odoo@cybrosys.com
+Kavya Raveendran - v12
+
+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
new file mode 100644
index 00000000..ba5a7b9a
--- /dev/null
+++ b/oh_employee_check_list/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Cybrosys Techno Solutions ()
+#
+# 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
new file mode 100644
index 00000000..16aeb303
--- /dev/null
+++ b/oh_employee_check_list/__manifest__.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Cybrosys Techno Solutions ()
+#
+# 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': '12.0.1.0.1',
+ 'summary': """Manages Employee's Entry & Exit Process""",
+ 'description': """This module is used to remembering the employee's entry and exit progress.""",
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'oh_employee_documents_expiry'],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'data/data.xml',
+ 'views/employee_form_inherit_view.xml',
+ 'views/checklist_view.xml',
+ 'views/employee_check_list_view.xml',
+ 'views/settings_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/data/data.xml b/oh_employee_check_list/data/data.xml
new file mode 100644
index 00000000..b82262b5
--- /dev/null
+++ b/oh_employee_check_list/data/data.xml
@@ -0,0 +1,23 @@
+
+
+
+ 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_check_list/doc/RELEASE_NOTES.md b/oh_employee_check_list/doc/RELEASE_NOTES.md
new file mode 100644
index 00000000..f76b3a96
--- /dev/null
+++ b/oh_employee_check_list/doc/RELEASE_NOTES.md
@@ -0,0 +1,12 @@
+## Module
+
+#### 01.02.2019
+#### Version 12.0.1.0.0
+##### ADD
+- Initial Commit
+
+
+#### 27.06.2019
+#### Version 12.0.1.0.1
+##### FIX
+- Bug Fixed
diff --git a/oh_employee_check_list/models/__init__.py b/oh_employee_check_list/models/__init__.py
new file mode 100644
index 00000000..cfd7a389
--- /dev/null
+++ b/oh_employee_check_list/models/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Cybrosys Techno Solutions ()
+#
+# 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
+from . import employee_entry_exit_check_list
diff --git a/oh_employee_check_list/models/employee_entry_exit_check_list.py b/oh_employee_check_list/models/employee_entry_exit_check_list.py
new file mode 100644
index 00000000..a258f70e
--- /dev/null
+++ b/oh_employee_check_list/models/employee_entry_exit_check_list.py
@@ -0,0 +1,53 @@
+# -*- 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 .
+#
+###################################################################################
+from odoo import models, fields, api
+
+
+class EmployeeEntryDocuments(models.Model):
+ _name = 'employee.checklist'
+ _inherit = ['mail.thread', 'mail.activity.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', help='Type of Checklist', readonly=1, required=1)
+
+
+class HrEmployeeDocumentInherit(models.Model):
+ _inherit = 'hr.employee.document'
+
+ document_name = fields.Many2one('employee.checklist', string='Document', help='Type of Document', required=True)
diff --git a/oh_employee_check_list/models/employee_master_inherit.py b/oh_employee_check_list/models/employee_master_inherit.py
new file mode 100644
index 00000000..077da014
--- /dev/null
+++ b/oh_employee_check_list/models/employee_master_inherit.py
@@ -0,0 +1,119 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Cybrosys Techno Solutions ()
+#
+# 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', 'mail.activity.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',
+ help='Type of Checklist', readonly=1, required=1)
+
+
+class HrEmployeeDocumentInherit(models.Model):
+ _inherit = 'hr.employee.document'
+
+ document_name = fields.Many2one('employee.checklist', string='Document', help='Type of Document', required=True)
+
+
+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
+ print(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': [(3, result.document_name.id)]})
+ if result.document_name.document_type == 'exit':
+ result.employee_ref.write({'exit_checklist': [(3, 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
new file mode 100644
index 00000000..63a118d5
--- /dev/null
+++ b/oh_employee_check_list/models/settings.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2018-TODAY Cybrosys Technologies ().
+# Author: Cybrosys Techno Solutions ()
+#
+# 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 HRSettings(models.TransientModel):
+ _inherit = 'res.config.settings'
+
+ enable_checklist = fields.Boolean(string='Enable Checklist Progress in Kanban?', default=False)
+
+ @api.model
+ def get_values(self):
+ res = super(HRSettings, self).get_values()
+ config = self.env['ir.config_parameter'].sudo()
+ enable_checklist = config.get_param('employee_check_list.enable_checklist', default=False)
+ res.update(
+ enable_checklist=enable_checklist
+ )
+ return res
+
+ @api.multi
+ def set_values(self):
+ super(HRSettings, self).set_values()
+ self.env['ir.config_parameter'].sudo().set_param('employee_check_list.enable_checklist',
+ self.enable_checklist)
+ emp_obj = self.env['hr.employee'].search([])
+ for rec in emp_obj:
+ rec.write({'check_list_enable': self.enable_checklist})
+
diff --git a/oh_employee_check_list/security/ir.model.access.csv b/oh_employee_check_list/security/ir.model.access.csv
new file mode 100644
index 00000000..76d8100f
--- /dev/null
+++ b/oh_employee_check_list/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+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
diff --git a/oh_employee_check_list/static/description/HRMS-BUTTON.png b/oh_employee_check_list/static/description/HRMS-BUTTON.png
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/oh_employee_check_list/static/description/HRMS-BUTTON.png differ
diff --git a/oh_employee_check_list/static/description/banner.jpg b/oh_employee_check_list/static/description/banner.jpg
new file mode 100644
index 00000000..d55e6335
Binary files /dev/null and b/oh_employee_check_list/static/description/banner.jpg differ
diff --git a/oh_employee_check_list/static/description/cybro-service.png b/oh_employee_check_list/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/oh_employee_check_list/static/description/cybro-service.png differ
diff --git a/oh_employee_check_list/static/description/cybro_logo.png b/oh_employee_check_list/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/oh_employee_check_list/static/description/cybro_logo.png differ
diff --git a/oh_employee_check_list/static/description/icon.png b/oh_employee_check_list/static/description/icon.png
new file mode 100644
index 00000000..0885ca68
Binary files /dev/null and b/oh_employee_check_list/static/description/icon.png differ
diff --git a/oh_employee_check_list/static/description/index.html b/oh_employee_check_list/static/description/index.html
new file mode 100644
index 00000000..c1d8119e
--- /dev/null
+++ b/oh_employee_check_list/static/description/index.html
@@ -0,0 +1,382 @@
+
+
+ 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.
+
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
\ 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
new file mode 100644
index 00000000..5d85b820
--- /dev/null
+++ b/oh_employee_check_list/views/settings_view.xml
@@ -0,0 +1,32 @@
+
+
+
+
+ HR Settings
+ res.config.settings
+
+
+
+
+
+
Checklist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oh_employee_creation_from_user/README.md b/oh_employee_creation_from_user/README.md
new file mode 100755
index 00000000..d94be37d
--- /dev/null
+++ b/oh_employee_creation_from_user/README.md
@@ -0,0 +1,17 @@
+Open HRMS Employees From User
+-----------------------------
+Supporting Addon for Open HRMS, Creates Employee While Creating User
+
+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_creation_from_user/__init__.py b/oh_employee_creation_from_user/__init__.py
new file mode 100755
index 00000000..7fe9ef40
--- /dev/null
+++ b/oh_employee_creation_from_user/__init__.py
@@ -0,0 +1,26 @@
+# -*- 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 .
+#
+###################################################################################
+from . import models
+
+
+
diff --git a/oh_employee_creation_from_user/__manifest__.py b/oh_employee_creation_from_user/__manifest__.py
new file mode 100755
index 00000000..66e20de2
--- /dev/null
+++ b/oh_employee_creation_from_user/__manifest__.py
@@ -0,0 +1,40 @@
+# -*- 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 Employees From User',
+ 'version': '11.0.1.0.0',
+ 'summary': 'Automatically Creates Employee While Creating User',
+ 'description': 'This module helps you to create employees automatically while creating users',
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'hr'],
+ 'data': ['views/employee_creation_from_user_view.xml'],
+ 'demo': [],
+ 'images': ['static/description/banner.jpg'],
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'auto_install': False,
+ 'application': False,
+}
diff --git a/oh_employee_creation_from_user/doc/RELEASE_NOTES.md b/oh_employee_creation_from_user/doc/RELEASE_NOTES.md
new file mode 100755
index 00000000..8f311eb8
--- /dev/null
+++ b/oh_employee_creation_from_user/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 30.03.2018
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for Open HRMS Project
diff --git a/oh_employee_creation_from_user/models/__init__.py b/oh_employee_creation_from_user/models/__init__.py
new file mode 100755
index 00000000..e388f8e8
--- /dev/null
+++ b/oh_employee_creation_from_user/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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 .
+#
+###################################################################################
+from . import employee_creation_from_user
+
diff --git a/oh_employee_creation_from_user/models/employee_creation_from_user.py b/oh_employee_creation_from_user/models/employee_creation_from_user.py
new file mode 100755
index 00000000..536c7e7b
--- /dev/null
+++ b/oh_employee_creation_from_user/models/employee_creation_from_user.py
@@ -0,0 +1,41 @@
+# -*- 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 .
+#
+###################################################################################
+from odoo import models, fields, api, _
+
+
+class ResUsersInherit(models.Model):
+ _inherit = 'res.users'
+
+ employee_id = fields.Many2one('hr.employee',
+ string='Related Employee', ondelete='restrict', auto_join=True,
+ help='Employee-related data of the user')
+
+ @api.model
+ def create(self, vals):
+ """This code is to create an employee while creating an user."""
+
+ result = super(ResUsersInherit, self).create(vals)
+ result['employee_id'] = self.env['hr.employee'].sudo().create({'name': result['name'],
+ 'user_id': result['id'],
+ 'address_home_id': result['partner_id'].id})
+ return result
diff --git a/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png b/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png differ
diff --git a/oh_employee_creation_from_user/static/description/banner.jpg b/oh_employee_creation_from_user/static/description/banner.jpg
new file mode 100755
index 00000000..1beaec80
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/banner.jpg differ
diff --git a/oh_employee_creation_from_user/static/description/cybro-service.png b/oh_employee_creation_from_user/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/cybro-service.png differ
diff --git a/oh_employee_creation_from_user/static/description/cybro_logo.png b/oh_employee_creation_from_user/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/cybro_logo.png differ
diff --git a/oh_employee_creation_from_user/static/description/icon.png b/oh_employee_creation_from_user/static/description/icon.png
new file mode 100755
index 00000000..d0c6a7c4
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/icon.png differ
diff --git a/oh_employee_creation_from_user/static/description/index.html b/oh_employee_creation_from_user/static/description/index.html
new file mode 100755
index 00000000..587c42e4
--- /dev/null
+++ b/oh_employee_creation_from_user/static/description/index.html
@@ -0,0 +1,352 @@
+
+
+
+ Open HRMS Employee From User
+
+
+ An employee will creates automatically while creating an user
+
+
\ No newline at end of file
diff --git a/oh_employee_creation_from_user/static/description/oh_icon.png b/oh_employee_creation_from_user/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/oh_icon.png differ
diff --git a/oh_employee_creation_from_user/static/description/open-hrms-employee-user-1.png b/oh_employee_creation_from_user/static/description/open-hrms-employee-user-1.png
new file mode 100755
index 00000000..139fbc51
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/open-hrms-employee-user-1.png differ
diff --git a/oh_employee_creation_from_user/static/description/open-hrms-employee-user-2.png b/oh_employee_creation_from_user/static/description/open-hrms-employee-user-2.png
new file mode 100755
index 00000000..d2c418a7
Binary files /dev/null and b/oh_employee_creation_from_user/static/description/open-hrms-employee-user-2.png differ
diff --git a/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml b/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml
new file mode 100755
index 00000000..68c956e8
--- /dev/null
+++ b/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ res.users.form
+ res.users
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oh_employee_documents_expiry/README.md b/oh_employee_documents_expiry/README.md
new file mode 100755
index 00000000..ee8775b0
--- /dev/null
+++ b/oh_employee_documents_expiry/README.md
@@ -0,0 +1,26 @@
+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/__init__.py b/oh_employee_documents_expiry/__init__.py
new file mode 100755
index 00000000..809f159c
--- /dev/null
+++ b/oh_employee_documents_expiry/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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 .
+#
+###################################################################################
+from . import models
+
diff --git a/oh_employee_documents_expiry/__manifest__.py b/oh_employee_documents_expiry/__manifest__.py
new file mode 100755
index 00000000..b1ae0649
--- /dev/null
+++ b/oh_employee_documents_expiry/__manifest__.py
@@ -0,0 +1,43 @@
+# -*- 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': '12.0.1.0.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,Open HRMS',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'website': "https://www.openhrms.com",
+ 'depends': ['base', 'hr'],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'views/employee_document_view.xml',
+ ],
+ 'images': ['static/description/banner.jpg'],
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'auto_install': False,
+ 'application': False,
+}
diff --git a/oh_employee_documents_expiry/docs/RELEASE_NOTES.md b/oh_employee_documents_expiry/docs/RELEASE_NOTES.md
new file mode 100755
index 00000000..0688cc1c
--- /dev/null
+++ b/oh_employee_documents_expiry/docs/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module 'oh_employee_documents_expiry'
+
+#### 30.03.2018
+#### Version 11.0.1.0.0
+##### ADD
+- Initial commit for Open HRMS Project
diff --git a/oh_employee_documents_expiry/models/__init__.py b/oh_employee_documents_expiry/models/__init__.py
new file mode 100755
index 00000000..9defd419
--- /dev/null
+++ b/oh_employee_documents_expiry/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- 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 .
+#
+###################################################################################
+from . import employee_documents
+
diff --git a/oh_employee_documents_expiry/models/employee_documents.py b/oh_employee_documents_expiry/models/employee_documents.py
new file mode 100755
index 00000000..d3f7e90d
--- /dev/null
+++ b/oh_employee_documents_expiry/models/employee_documents.py
@@ -0,0 +1,107 @@
+# -*- 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 .
+#
+###################################################################################
+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):
+ """Sending document expiry notification to employees."""
+
+ 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, help='You can give your'
+ 'Document number.')
+ 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.Char(string='Issue Date', default=fields.datetime.now(), copy=False)
+ active = fields.Boolean(default=True)
+
+
+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/security/ir.model.access.csv b/oh_employee_documents_expiry/security/ir.model.access.csv
new file mode 100755
index 00000000..b2f79acf
--- /dev/null
+++ b/oh_employee_documents_expiry/security/ir.model.access.csv
@@ -0,0 +1,5 @@
+id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
+"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
new file mode 100755
index 00000000..0f1b65be
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/HRMS-BUTTON.png differ
diff --git a/oh_employee_documents_expiry/static/description/banner.jpg b/oh_employee_documents_expiry/static/description/banner.jpg
new file mode 100755
index 00000000..02c616c3
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/banner.jpg differ
diff --git a/oh_employee_documents_expiry/static/description/cybro-service.png b/oh_employee_documents_expiry/static/description/cybro-service.png
new file mode 100755
index 00000000..252929a8
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/cybro-service.png differ
diff --git a/oh_employee_documents_expiry/static/description/cybro_logo.png b/oh_employee_documents_expiry/static/description/cybro_logo.png
new file mode 100755
index 00000000..bb309114
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/cybro_logo.png differ
diff --git a/oh_employee_documents_expiry/static/description/document_form.png b/oh_employee_documents_expiry/static/description/document_form.png
new file mode 100755
index 00000000..2fa2434c
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/document_form.png differ
diff --git a/oh_employee_documents_expiry/static/description/icon.png b/oh_employee_documents_expiry/static/description/icon.png
new file mode 100755
index 00000000..0bfe48f4
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/icon.png differ
diff --git a/oh_employee_documents_expiry/static/description/index.html b/oh_employee_documents_expiry/static/description/index.html
new file mode 100755
index 00000000..4217f6ae
--- /dev/null
+++ b/oh_employee_documents_expiry/static/description/index.html
@@ -0,0 +1,368 @@
+
+
+
+ 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)
+
+
+
+ Configuration
+
+
+ No additional configuration is required.
+
+
+
+
+
+
+
+
+ Features
+
+
+
+ Documents Types.
+ Expiry Date for Documents.
+ Validation for Expiry Date.
+ Managing Documents of Employees.
+ Mail Notification Based on Expiry Date.
+
+
+
+
diff --git a/oh_employee_documents_expiry/static/description/oh_icon.png b/oh_employee_documents_expiry/static/description/oh_icon.png
new file mode 100644
index 00000000..37ae6286
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/oh_icon.png differ
diff --git a/oh_employee_documents_expiry/static/description/open-hrms-employee-document-1.png b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-1.png
new file mode 100755
index 00000000..ce821d21
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-1.png differ
diff --git a/oh_employee_documents_expiry/static/description/open-hrms-employee-document-2.png b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-2.png
new file mode 100755
index 00000000..d651afa3
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-2.png differ
diff --git a/oh_employee_documents_expiry/static/description/open-hrms-employee-document-3.png b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-3.png
new file mode 100755
index 00000000..fff69b11
Binary files /dev/null and b/oh_employee_documents_expiry/static/description/open-hrms-employee-document-3.png differ
diff --git a/oh_employee_documents_expiry/views/employee_document_view.xml b/oh_employee_documents_expiry/views/employee_document_view.xml
new file mode 100755
index 00000000..a4126878
--- /dev/null
+++ b/oh_employee_documents_expiry/views/employee_document_view.xml
@@ -0,0 +1,80 @@
+
+
+
+ Employee Document Expiration
+ 1
+ days
+ -1
+
+
+ code
+ model.mail_reminder()
+
+
+
+ hr.employee.document.form
+ hr.employee.document
+
+
+
+
+
+
+ hr.employee.document.tree
+ hr.employee.document
+
+
+
+
+
+
+
+
+
+
+ hr.employee.document.tree
+ hr.employee.document
+
+
+
+
+
+
+
+
+ hr.employee.form.view
+ hr.employee
+
+
+
+
+
+
+
+
+
+
diff --git a/oh_hr_lawsuit_management/README.md b/oh_hr_lawsuit_management/README.md
new file mode 100644
index 00000000..7d285f16
--- /dev/null
+++ b/oh_hr_lawsuit_management/README.md
@@ -0,0 +1,32 @@
+OHRMS Legal Actions
+---------------------
+Supporting Addon for Open HRMS, Managing Legal Actions
+
+
+Installation
+------------
+- www.odoo.com/documentation/12.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.
+
+
+Contacts
+--------
+info - info@cybrosys.com
+Sreejith P - odoo@cybrosys.com
+Jesni Banu - odoo@cybrosys.com
+
+Website:
+https://www.openhrms.com
+https://www.cybrosys.com
+
+Maintainer
+----------
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit https://www.cybrosys.com.
diff --git a/oh_hr_lawsuit_management/__init__.py b/oh_hr_lawsuit_management/__init__.py
new file mode 100644
index 00000000..f63c79b9
--- /dev/null
+++ b/oh_hr_lawsuit_management/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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
new file mode 100644
index 00000000..77c9a0a6
--- /dev/null
+++ b/oh_hr_lawsuit_management/__manifest__.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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': '12.0.1.0.0',
+ 'summary': """Managing Legal Actions""",
+ 'description': 'This module manages legal actions.',
+ 'category': 'Generic Modules/Human Resources',
+ 'author': 'Cybrosys Techno solutions,Open HRMS',
+ '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
new file mode 100644
index 00000000..b0868f48
--- /dev/null
+++ b/oh_hr_lawsuit_management/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 06.03.2018
+#### Version 12.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
new file mode 100644
index 00000000..f75c6d0c
--- /dev/null
+++ b/oh_hr_lawsuit_management/models/__init__.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+###################################################################################
+# A part of OpenHRMS Project
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2019-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_action
+
+
+
+
diff --git a/oh_hr_lawsuit_management/models/legal_action.py b/oh_hr_lawsuit_management/models/legal_action.py
new file mode 100644
index 00000000..17487b2c
--- /dev/null
+++ b/oh_hr_lawsuit_management/models/legal_action.py
@@ -0,0 +1,128 @@
+# -*- 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', 'mail.activity.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,
+ 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
new file mode 100644
index 00000000..a57ffa0c
--- /dev/null
+++ b/oh_hr_lawsuit_management/security/ir.model.access.csv
@@ -0,0 +1,4 @@
+"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_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
new file mode 100644
index 00000000..026117cb
--- /dev/null
+++ b/oh_hr_lawsuit_management/security/security.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ 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
new file mode 100644
index 00000000..0f1b65be
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/HRMS-BUTTON.png differ
diff --git a/oh_hr_lawsuit_management/static/description/banner.jpg b/oh_hr_lawsuit_management/static/description/banner.jpg
new file mode 100644
index 00000000..491e60d5
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/banner.jpg differ
diff --git a/oh_hr_lawsuit_management/static/description/cybro-service.png b/oh_hr_lawsuit_management/static/description/cybro-service.png
new file mode 100644
index 00000000..252929a8
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/cybro-service.png differ
diff --git a/oh_hr_lawsuit_management/static/description/cybro_logo.png b/oh_hr_lawsuit_management/static/description/cybro_logo.png
new file mode 100644
index 00000000..bb309114
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/cybro_logo.png differ
diff --git a/oh_hr_lawsuit_management/static/description/hr_legal.png b/oh_hr_lawsuit_management/static/description/hr_legal.png
new file mode 100644
index 00000000..0c446488
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/hr_legal.png differ
diff --git a/oh_hr_lawsuit_management/static/description/icon.png b/oh_hr_lawsuit_management/static/description/icon.png
new file mode 100644
index 00000000..cd9a8e82
Binary files /dev/null and b/oh_hr_lawsuit_management/static/description/icon.png differ
diff --git a/oh_hr_lawsuit_management/static/description/index.html b/oh_hr_lawsuit_management/static/description/index.html
new file mode 100644
index 00000000..f154fe4d
--- /dev/null
+++ b/oh_hr_lawsuit_management/static/description/index.html
@@ -0,0 +1,349 @@
+
+
+ Automation is an implementation factor for a successful ERP. With this module,
+ HR attendance can automate by integrating Thumb / Face detection device with Odoo.
+ We can configure a user both from thumbing device or Odoo employee form.
+