@ -1,47 +0,0 @@ |
|||
Open HRMS Custody Management |
|||
============================ |
|||
|
|||
Functionality to give and track the assets of a company to employees. |
|||
- Creates a new menu item Custody Management under Employees |
|||
- Can create custody contract with an employee |
|||
- Can take the report of custody |
|||
|
|||
Depends |
|||
======= |
|||
[hr, mail, hr_employee_updation] addon Odoo |
|||
|
|||
Tech |
|||
==== |
|||
* [Python] - Models |
|||
* [XML] - Odoo views |
|||
|
|||
Installation |
|||
============ |
|||
- www.odoo.com/documentation/11.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 <https://www.cybrosys.com> |
|||
|
|||
Author |
|||
------ |
|||
|
|||
Developers: Avinash Nk <avinash@cybrosys.in> |
|||
Jesni Banu <jesni@cybrosys.in> |
|||
|
|||
Maintainer |
|||
---------- |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com. |
@ -1,24 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of OpenHRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import models |
|||
from . import reports |
@ -1,50 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
{ |
|||
'name': 'Open HRMS Custody', |
|||
'version': '11.0.1.0.0', |
|||
'summary': """Manage the company properties when it is in the custody of an employee""", |
|||
'description': 'Manage the company properties when it is in the custody of an employee', |
|||
'category': 'Human Resources', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.openhrms.com", |
|||
'depends': ['hr', 'mail', 'hr_employee_updation'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'security/custody_security.xml', |
|||
'views/wizard_reason_view.xml', |
|||
'views/custody_view.xml', |
|||
'views/hr_custody_notification.xml', |
|||
'views/hr_employee_view.xml', |
|||
'views/notification_mail.xml', |
|||
'reports/custody_report.xml' |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'demo': [], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -1,6 +0,0 @@ |
|||
## Module hr_custody |
|||
|
|||
#### 21.04.2018 |
|||
#### Version 11.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Open Hrms Project |
@ -1,25 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import custody |
|||
from . import hr_employee |
|||
from . import wizard_reason |
@ -1,208 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from datetime import datetime, timedelta |
|||
from odoo import models, fields, api, _ |
|||
from odoo.exceptions import Warning, UserError |
|||
from odoo.tools import image_resize_images |
|||
|
|||
|
|||
class HrCustody(models.Model): |
|||
""" |
|||
Hr custody contract creation model. |
|||
""" |
|||
_name = 'hr.custody' |
|||
_description = 'Hr Custody Management' |
|||
_inherit = ['mail.thread', '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,<br>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.<br> <div style = "text-align: center; margin-top: 16px;"><a href = "%s"' |
|||
'style = "padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; ' |
|||
'border-color:#875A7B;text-decoration: none; display: inline-block; ' |
|||
'margin-bottom: 0px; font-weight: 400;text-align: center; vertical-align: middle; ' |
|||
'cursor: pointer; white-space: nowrap; background-image: none; ' |
|||
'background-color: #875A7B; border: 1px solid #875A7B; border-radius:3px;">' |
|||
'Renew %s</a></div>') % \ |
|||
(i.employee.name, i.name, i.custody_name.name, i.date_request, i.purpose, |
|||
date_now, i.name, url, i.name) |
|||
main_content = { |
|||
'subject': _('REMINDER On %s') % i.name, |
|||
'author_id': self.env.user.partner_id.id, |
|||
'body_html': mail_content, |
|||
'email_to': i.employee.work_email, |
|||
} |
|||
mail_id = self.env['mail.mail'].create(main_content) |
|||
mail_id.mail_message_id.body = mail_content |
|||
mail_id.send() |
|||
if i.employee.user_id: |
|||
mail_id.mail_message_id.write({'needaction_partner_ids': [(4, i.employee.user_id.partner_id.id)]}) |
|||
mail_id.mail_message_id.write({'partner_ids': [(4, i.employee.user_id.partner_id.id)]}) |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
vals['name'] = self.env['ir.sequence'].next_by_code('hr.custody') |
|||
return super(HrCustody, self).create(vals) |
|||
|
|||
@api.multi |
|||
def sent(self): |
|||
self.state = 'to_approve' |
|||
|
|||
@api.multi |
|||
def send_mail(self): |
|||
template = self.env.ref('hr_custody.custody_email_notification_template') |
|||
self.env['mail.template'].browse(template.id).send_mail(self.id) |
|||
self.mail_send = True |
|||
|
|||
@api.multi |
|||
def set_to_draft(self): |
|||
self.state = 'draft' |
|||
|
|||
@api.multi |
|||
def renew_approve(self): |
|||
for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): |
|||
if custody.state == "approved": |
|||
raise UserError(_("Custody is not available now")) |
|||
self.return_date = self.renew_date |
|||
self.renew_date = '' |
|||
self.state = 'approved' |
|||
|
|||
@api.multi |
|||
def renew_refuse(self): |
|||
for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): |
|||
if custody.state == "approved": |
|||
raise UserError(_("Custody is not available now")) |
|||
self.renew_date = '' |
|||
self.state = 'approved' |
|||
|
|||
@api.multi |
|||
def approve(self): |
|||
for custody in self.env['hr.custody'].search([('custody_name', '=', self.custody_name.id)]): |
|||
if custody.state == "approved": |
|||
raise UserError(_("Custody is not available now")) |
|||
self.state = 'approved' |
|||
|
|||
@api.multi |
|||
def set_to_return(self): |
|||
self.state = 'returned' |
|||
self.return_date = fields.datetime.now() |
|||
|
|||
# return date validation |
|||
@api.constrains('return_date') |
|||
def validate_return_date(self): |
|||
if self.return_date < self.date_request: |
|||
raise Warning('Please Give Valid Return Date') |
|||
|
|||
name = fields.Char(string='Code', copy=False) |
|||
company_id = fields.Many2one('res.company', 'Company', readonly=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
rejected_reason = fields.Text(string='Rejected Reason', copy=False, readonly=1) |
|||
renew_rejected_reason = fields.Text(string='Renew Rejected Reason', copy=False, readonly=1) |
|||
date_request = fields.Date(string='Requested Date', required=True, track_visibility='always', readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
employee = fields.Many2one('hr.employee', string='Employee', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
purpose = fields.Char(string='Reason', track_visibility='always', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
custody_name = fields.Many2one('custody.property', string='Property', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
return_date = fields.Date(string='Return Date', required=True, track_visibility='always', readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
renew_date = fields.Date(string='Renewal Return Date', track_visibility='always', readonly=True, copy=False) |
|||
notes = fields.Html(string='Notes') |
|||
renew_return_date = fields.Boolean(default=False, copy=False) |
|||
renew_reject = fields.Boolean(default=False, copy=False) |
|||
state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'), ('approved', 'Approved'), |
|||
('returned', 'Returned'), ('rejected', 'Refused')], string='Status', default='draft', |
|||
track_visibility='always') |
|||
mail_send = fields.Boolean(string="Mail Send") |
|||
|
|||
|
|||
class HrPropertyName(models.Model): |
|||
""" |
|||
Hr property creation model. |
|||
""" |
|||
_name = 'custody.property' |
|||
_description = 'Property Name' |
|||
|
|||
name = fields.Char(string='Property Name', required=True) |
|||
image = fields.Binary( |
|||
"Image", attachment=True, |
|||
help="This field holds the image used for this provider, limited to 1024x1024px") |
|||
image_medium = fields.Binary( |
|||
"Medium-sized image", attachment=True, |
|||
help="Medium-sized image of this provider. It is automatically " |
|||
"resized as a 128x128px image, with aspect ratio preserved. " |
|||
"Use this field in form views or some kanban views.") |
|||
image_small = fields.Binary( |
|||
"Small-sized image", attachment=True, |
|||
help="Small-sized image of this provider. It is automatically " |
|||
"resized as a 64x64px image, with aspect ratio preserved. " |
|||
"Use this field anywhere a small image is required.") |
|||
desc = fields.Html(string='Description') |
|||
company_id = fields.Many2one('res.company', 'Company', |
|||
default=lambda self: self.env.user.company_id) |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
image_resize_images(vals) |
|||
return super(HrPropertyName, self).create(vals) |
|||
|
|||
@api.multi |
|||
def write(self, vals): |
|||
image_resize_images(vals) |
|||
return super(HrPropertyName, self).write(vals) |
|||
|
|||
|
|||
class HrReturnDate(models.TransientModel): |
|||
"""Hr custody contract renewal wizard""" |
|||
_name = 'wizard.return.date' |
|||
_description = 'Hr Custody Name' |
|||
|
|||
returned_date = fields.Date(string='Renewal Date', required=1) |
|||
|
|||
# renewal date validation |
|||
@api.constrains('returned_date') |
|||
def validate_return_date(self): |
|||
context = self._context |
|||
custody_obj = self.env['hr.custody'].search([('id', '=', context.get('custody_id'))]) |
|||
if self.returned_date <= custody_obj.date_request: |
|||
raise Warning('Please Give Valid Renewal Date') |
|||
|
|||
@api.multi |
|||
def proceed(self): |
|||
context = self._context |
|||
custody_obj = self.env['hr.custody'].search([('id', '=', context.get('custody_id'))]) |
|||
custody_obj.write({'renew_return_date': True, |
|||
'renew_date': self.returned_date, |
|||
'state': 'to_approve'}) |
@ -1,118 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
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 |
@ -1,48 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
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") |
@ -1,23 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import custody_report |
@ -1,84 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Authors: Avinash Nk, Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from odoo import models, fields, tools |
|||
|
|||
|
|||
class CustodyHistory(models.Model): |
|||
_name = "report.custody" |
|||
_description = "Custody Analysis" |
|||
_auto = False |
|||
|
|||
name = fields.Char(string='Code') |
|||
date_request = fields.Date(string='Requested Date') |
|||
employee = fields.Many2one('hr.employee', string='Employee') |
|||
purpose = fields.Char(string='Reason') |
|||
custody_name = fields.Many2one('custody.property', string='Custody Name') |
|||
return_date = fields.Date(string='Return Date') |
|||
renew_date = fields.Date(string='Renewal Return Date') |
|||
renew_return_date = fields.Boolean(string='Renewal Return Date') |
|||
state = fields.Selection([('draft', 'Draft'), ('to_approve', 'Waiting For Approval'), ('approved', 'Approved'), |
|||
('returned', 'Returned'), ('rejected', 'Refused')], string='Status') |
|||
|
|||
_order = 'name desc' |
|||
|
|||
def _select(self): |
|||
select_str = """ |
|||
SELECT |
|||
(select 1 ) AS nbr, |
|||
t.id as id, |
|||
t.name as name, |
|||
t.date_request as date_request, |
|||
t.employee as employee, |
|||
t.purpose as purpose, |
|||
t.custody_name as custody_name, |
|||
t.return_date as return_date, |
|||
t.renew_date as renew_date, |
|||
t.renew_return_date as renew_return_date, |
|||
t.state as state |
|||
""" |
|||
return select_str |
|||
|
|||
def _group_by(self): |
|||
group_by_str = """ |
|||
GROUP BY |
|||
t.id, |
|||
name, |
|||
date_request, |
|||
employee, |
|||
purpose, |
|||
custody_name, |
|||
return_date, |
|||
renew_date, |
|||
renew_return_date, |
|||
state |
|||
""" |
|||
return group_by_str |
|||
|
|||
def init(self): |
|||
tools.sql.drop_view_if_exists(self._cr, 'report_custody') |
|||
self._cr.execute(""" |
|||
CREATE view report_custody as |
|||
%s |
|||
FROM hr_custody t |
|||
%s |
|||
""" % (self._select(), self._group_by())) |
@ -1,27 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_report_custody" model="ir.ui.view"> |
|||
<field name="name">report.custody.pivot</field> |
|||
<field name="model">report.custody</field> |
|||
<field name="arch" type="xml"> |
|||
<pivot string="Ticket Analysis" display_quantity="true" disable_linking="True"> |
|||
<field name="name" type="row"/> |
|||
</pivot> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_report_custody" model="ir.actions.act_window"> |
|||
<field name="name">Custody Analysis</field> |
|||
<field name="res_model">report.custody</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">pivot</field> |
|||
<field name="context">{'group_by_no_leaf':1,'group_by':[]}</field> |
|||
<field name="help">This report allows you to analyse all Custody Requests. </field> |
|||
</record> |
|||
|
|||
<menuitem name="Custody Analysis" action="action_report_custody" id="menu_custody_analysis" |
|||
groups="hr.group_hr_manager" |
|||
parent="hr_employee_updation.employee_report_menu" sequence="1"/> |
|||
</data> |
|||
</odoo> |
@ -1,16 +0,0 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
<record id="property_rule_custody" model="ir.rule"> |
|||
<field name="name">Custody Multi Company</field> |
|||
<field name="model_id" ref="model_custody_property"/> |
|||
<field eval="True" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="property_rule_custody_req" model="ir.rule"> |
|||
<field name="name">Custody Request Multi Company</field> |
|||
<field name="model_id" ref="model_hr_custody"/> |
|||
<field eval="True" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
</odoo> |
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 30 KiB |
@ -1,119 +0,0 @@ |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Open HRMS</h2> |
|||
<h3 class="oe_slogan">Most advanced open source HR management software</h3> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced oe_mt32"> |
|||
<div class="oe_span"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<a href="https://www.openhrms.com/#request-demo"> |
|||
<img src="HRMS-BUTTON.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Open HRMS Custody Management</h2> |
|||
<h3 class="oe_slogan">Manages Custody Handling Process</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
<div class="oe_row oe_spaced" style="padding-left:65px;"> |
|||
<h4>Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑ </span> Managing custody handling process.<br/> |
|||
<span style="color:green;"> ☑ </span> Option to renewal.<br/> |
|||
<span style="color:green;"> ☑ </span> Option to take reports.<br/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container "> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32 text-justify" style="text-align: center;"> |
|||
Blues over resource tracking? No more worries. |
|||
OHRMS Custody Management system constitutes the ultimate |
|||
solution for a transparent custody of company resources. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Custody Request</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Create a Custody Request.<br> |
|||
☛ Send for Approval.<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="custody_request.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container "> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Property</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Create a Property of Company.<br> |
|||
<p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="custody_property.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
<div class="row section-content"> |
|||
<div class="col-md-6 img-content"> |
|||
<h3>Our Odoo Services</h3> |
|||
</div> |
|||
<div class="bc-span col-md-12"> |
|||
<div class="inner-span"> |
|||
<a target="_blank" href="https://www.openhrms.com"> |
|||
<img class="img-border img-responsive thumbnail" src="cybro-service.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/" target="_blank"><i |
|||
class="fa fa-phone"></i> Contact Us </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.odoo.com/apps/modules/browse?search=open+hrms" target="_blank"><i |
|||
class="fa fa-suitcase"></i> Other Open HRMS Addons </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"><i |
|||
class="fa fa-wrench"></i> Request Customization </a> |
|||
|
|||
</div> |
|||
<br> |
|||
<a href="https://www.cybrosys.com/" target="_blank"> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</a> |
|||
</div> |
|||
</section> |
|||
|
@ -1,222 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="seq_hr_custody_seq" model="ir.sequence"> |
|||
<field name="name">Custody Code</field> |
|||
<field name="code">hr.custody</field> |
|||
<field name="prefix">CR</field> |
|||
<field eval="4" name="padding" /> |
|||
<field eval="False" name="company_id"/> |
|||
</record> |
|||
|
|||
<record model='ir.ui.view' id='wizard_return_date_form'> |
|||
<field name="name">wizard.return.date.form</field> |
|||
<field name="model">wizard.return.date</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Renewal Request"> |
|||
<group> |
|||
<group> |
|||
<field name="returned_date"/> |
|||
</group> |
|||
</group> |
|||
<footer> |
|||
<button name="proceed" string="Proceed" type="object" class="oe_highlight"/> |
|||
or |
|||
<button string="Cancel" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model='ir.ui.view' id='custody_custody_form_view'> |
|||
<field name="name">custody.property.form</field> |
|||
<field name="model">custody.property</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Equipments"> |
|||
<sheet> |
|||
<field name="image" widget='image' class="oe_avatar" options='{"preview_image": "image_medium"}'/> |
|||
<div class="oe_title"> |
|||
<h1><field name="name" placeholder="Name"/></h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</group> |
|||
<group></group> |
|||
</group> |
|||
<notebook> |
|||
<page name="desc" string="Description"> |
|||
<field name="desc"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model='ir.actions.act_window' id='wizard_return_date_act'> |
|||
<field name="name">Custody Request</field> |
|||
<field name="res_model">wizard.return.date</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="wizard_return_date_form"/> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
<record id="hr_custody_form_view" model="ir.ui.view"> |
|||
<field name="name">hr.custody.form</field> |
|||
<field name="model">hr.custody</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Custody"> |
|||
<header> |
|||
<button string="Send For Approval" type="object" name="sent" |
|||
attrs="{'invisible': [('state','not in',('draft'))]}"/> |
|||
<button string="Approve" groups="hr.group_hr_manager" type="object" name="approve" |
|||
attrs="{'invisible': ['|',('state','not in',('to_approve')), |
|||
('renew_return_date','=',True)]}"/> |
|||
<button string="Renewal Approval" groups="hr.group_hr_manager" type="object" name="renew_approve" |
|||
attrs="{'invisible': ['|',('state','not in',('to_approve')), |
|||
('renew_return_date','=',False)]}"/> |
|||
<button string="Refuse" groups="hr.group_hr_manager" type="action" name="%(hr_custody.wizard_reason_act)d" |
|||
attrs="{'invisible': ['|',('state','not in',('to_approve')), |
|||
('renew_return_date','=',True)]}" class="btn-primary" context="{'reject_id':id,'model_id':'hr.custody'}"/> |
|||
<button class="btn-primary" name="%(hr_custody.wizard_reason_act)d" string="Refuse" groups="hr.group_hr_manager" type="action" |
|||
attrs="{'invisible': ['|',('state','not in',('to_approve')), |
|||
('renew_return_date','=',False)]}" context="{'reject_id':id,'model_id':'hr.custody','renew': 'renew'}"/> |
|||
<button string="Set to Draft" type="object" name="set_to_draft" |
|||
attrs="{'invisible': [('state','not in',('rejected'))]}"/> |
|||
<button string="Return" type="object" name="set_to_return" groups="hr.group_hr_manager" |
|||
attrs="{'invisible': [('state','not in',('approved'))]}"/> |
|||
<button string="Send Mail" type="object" name="send_mail" groups="hr.group_hr_manager" |
|||
attrs="{'invisible': ['|',('mail_send', '=', False),('state','not in',('approved'))]}"/> |
|||
<button string="Send Mail" type="object" class="oe_highlight" name="send_mail" groups="hr.group_hr_manager" |
|||
attrs="{'invisible': ['|',('mail_send', '=', True),('state','not in',('approved'))]}"/> |
|||
<button string="Renew" type="action" name="%(wizard_return_date_act)d" |
|||
context="{'custody_id':id}" |
|||
attrs="{'invisible': ['|',('state','not in',('approved')), |
|||
('renew_return_date','=',True)]}"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,to_approve,approved,returned"/> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="name" readonly="1" nolabel="1"/> |
|||
</h1> |
|||
<group> |
|||
<group> |
|||
<field name="custody_name" options="{'no_open':True,'no_create':True}" |
|||
domain="[('company_id','child_of',[company_id])]"/> |
|||
<field name="renew_return_date" invisible="1"/> |
|||
<field name="renew_reject" invisible="1"/> |
|||
<field name="mail_send" invisible="1"/> |
|||
<field name="employee"/> |
|||
<field name="purpose"/> |
|||
</group> |
|||
<group> |
|||
<field name="date_request"/> |
|||
<field name="return_date" attrs="{'invisible': [('renew_return_date','=',True), |
|||
('renew_date','not in',[None,False]),('renew_reject','=',False)]}"/> |
|||
<field name="renew_date" attrs="{'invisible': ['|',('renew_return_date','=',False), |
|||
('state','!=','to_approve')]}"/> |
|||
<field name="rejected_reason" attrs="{'invisible': [('state','not in',('rejected'))]}"/> |
|||
<field name="renew_rejected_reason" attrs="{'invisible': ['|',('renew_reject','=',False),('state','not in',('approved'))]}"/> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Notes"> |
|||
<field name="notes"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_custody_tree_view" model="ir.ui.view"> |
|||
<field name="name">hr.custody.tree</field> |
|||
<field name="model">hr.custody</field> |
|||
<field name="arch" type="xml"> |
|||
<tree decoration-info="state == 'draft'" colors="red:current_date > return_date;grey:state == 'rejected';green:state == 'approved'; |
|||
black:state == 'to_approve';grey:state == 'returned';"> |
|||
<field name="name"/> |
|||
<field name="custody_name"/> |
|||
<field name="employee"/> |
|||
<field name="purpose"/> |
|||
<field name="date_request"/> |
|||
<field name="return_date"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_property_tree_view" model="ir.ui.view"> |
|||
<field name="name">hr_property_tree_view.tree</field> |
|||
<field name="model">custody.property</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_custody_search_view" model="ir.ui.view"> |
|||
<field name="name">hr.custody.search</field> |
|||
<field name="model">hr.custody</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Custody"> |
|||
<field name="name"/> |
|||
<field name="custody_name"/> |
|||
<field name="employee"/> |
|||
<field name="purpose"/> |
|||
<field name="date_request"/> |
|||
<field name="return_date"/> |
|||
<field name="state"/> |
|||
<separator/> |
|||
<group expand="0" string="Group By"> |
|||
<filter string="Status" domain="[]" context="{'group_by':'state'}"/> |
|||
<filter string="Employee" domain="[]" context="{'group_by':'employee'}"/> |
|||
<filter string="Custody Name" domain="[]" context="{'group_by':'custody_name'}"/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_hr_custody" model="ir.actions.act_window"> |
|||
<field name="name">Custody</field> |
|||
<field name="res_model">hr.custody</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="hr_custody_search_view"/> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to Create a New Record. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_hr_property" model="ir.actions.act_window"> |
|||
<field name="name">Property</field> |
|||
<field name="res_model">custody.property</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to Create a New Record. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem id="hr_custody_main_menu" parent="hr.menu_hr_root" |
|||
name="Custody Management" sequence="20"/> |
|||
|
|||
<menuitem action="action_hr_custody" id="hr_custody_menu" parent="hr_custody.hr_custody_main_menu" |
|||
name="Custody Request" sequence="1"/> |
|||
|
|||
<menuitem action="action_hr_property" id="hr_property_menu" parent="hr_custody.hr_custody_main_menu" |
|||
name="Property" sequence="5" groups="hr.group_hr_user"/> |
|||
</data> |
|||
</odoo> |
@ -1,15 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.cron" id="hr_custody_data_reminders"> |
|||
<field name="name">HR Custody Return Notification</field> |
|||
<field name="interval_number">1</field> |
|||
<field name="interval_type">days</field> |
|||
<field name="numbercall">-1</field> |
|||
<field name="doall" eval="False"/> |
|||
<field name="model_id" ref="model_hr_custody"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model.mail_reminder()</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,20 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.ui.view" id="custody_hr_employee_inherit_form_view"> |
|||
<field name="name">hr.employee.form.inherit.view</field> |
|||
<field name="model">hr.employee</field> |
|||
<field name="inherit_id" ref="hr.view_employee_form"/> |
|||
<field name="arch" type="xml"> |
|||
<div class="oe_button_box" position="inside"> |
|||
<button class="oe_stat_button" name="custody_view" type="object" icon="fa-list-ol"> |
|||
<field string="Custody" name="custody_count" widget="statinfo"/> |
|||
</button> |
|||
<button class="oe_stat_button" name="equipment_view" type="object" icon="fa-tablet"> |
|||
<field string="Equipments" name="equipment_count" widget="statinfo"/> |
|||
</button> |
|||
</div> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,24 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="custody_email_notification_template" model="mail.template"> |
|||
<field name="name">Custody e-mail template</field> |
|||
<field name="email_from">${object.company_id and object.company_id.email or ''}</field> |
|||
<field name="subject">Notification to return company asset-${object.custody_name.name}</field> |
|||
<field name="email_to">${object.email|safe}</field> |
|||
<field name="lang">${object.lang}</field> |
|||
<field name="model_id" ref="hr_custody.model_hr_custody"/> |
|||
<field name="auto_delete" eval="True"/> |
|||
<field name="body_html"> |
|||
<![CDATA[ |
|||
<p>Dear ${(object.employee.name)},<br/><br/> |
|||
You are in possession of the company asset |
|||
<strong>"${(object.custody_name.name)}"</strong> |
|||
since <strong>${(object.return_date)}.</strong><br/><br/> |
|||
Please kindly return the property as soon as possible.<br/><br/></p> |
|||
Regards,<br/><br/> |
|||
${(object.company_id.name)}]]> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,30 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record model='ir.ui.view' id='wizard_reason_form'> |
|||
<field name="name">wizard.reason.form</field> |
|||
<field name="model">wizard.reason</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Update Reason"> |
|||
<group> |
|||
<field name="reason" required="True"/> |
|||
</group> |
|||
<footer> |
|||
<button name="send_reason" string="Proceed" type="object" class="oe_highlight"/> |
|||
or |
|||
<button string="Cancel" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model='ir.actions.act_window' id='wizard_reason_act'> |
|||
<field name="name">Update Reason</field> |
|||
<field name="res_model">wizard.reason</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="wizard_reason_form"/> |
|||
<field name="target">new</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,39 +0,0 @@ |
|||
Open HRMS Employee Transfer v11 |
|||
=============================== |
|||
|
|||
Employee transfer between branches. |
|||
|
|||
Depends |
|||
======= |
|||
[hr] 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 <https://www.cybrosys.com> |
|||
|
|||
Author |
|||
------ |
|||
|
|||
Developer: Sreejith P @ cybrosys, sreejith@cybrosys.in |
|||
|
|||
Maintainer |
|||
---------- |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com. |
@ -1,2 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import models |
@ -1,45 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Sreejith P (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
{ |
|||
'name': 'Open HRMS Branch Transfer', |
|||
'version': '11.0.1.0.0', |
|||
'summary': 'Employee transfer between branches', |
|||
'category': 'Generic Modules/Human Resources', |
|||
'author': 'Cybrosys Techno solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.openhrms.com', |
|||
'depends': ['base', |
|||
'hr_employee_updation' |
|||
], |
|||
'data': [ |
|||
'views/employee_transfer.xml', |
|||
'security/ir.model.access.csv', |
|||
'security/branch_security.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'application': True, |
|||
'auto_install': False, |
|||
'license': 'AGPL-3', |
|||
} |
@ -1,6 +0,0 @@ |
|||
## Module hr_employee_transfer |
|||
|
|||
#### 21.04.2018 |
|||
#### Version 11.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for OpenHrms Project |
@ -1,4 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import employee_transfer |
|||
from . import hr_contract |
|||
from . import res_company |
@ -1,106 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from datetime import date |
|||
from odoo import models, fields, api, _ |
|||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT |
|||
from odoo.exceptions import Warning |
|||
|
|||
|
|||
class EmployeeTransfer(models.Model): |
|||
_name = 'employee.transfer' |
|||
_description = 'Employee Transfer' |
|||
_order = "id desc" |
|||
|
|||
def _default_employee(self): |
|||
emp_ids = self.env['hr.employee'].search([('user_id', '=', self.env.uid)]) |
|||
return emp_ids and emp_ids[0] or False |
|||
|
|||
name = fields.Char(string='Name', help='Give a name to the Transfer', copy=False, default="/", readonly=True) |
|||
employee_id = fields.Many2one('hr.employee', string='Employee', required=True, |
|||
help='Select the employee you are going to transfer') |
|||
date = fields.Date(string='Date', default=fields.Date.today()) |
|||
branch = fields.Many2one('transfer.company', string='Transfer Branch', requried=True, copy=False, |
|||
help='The Branch/Company which the employee is transferred') |
|||
state = fields.Selection( |
|||
[('draft', 'New'), ('cancel', 'Cancelled'), ('transfer', 'Transferred'), ('done', 'Done')], |
|||
string='Status', readonly=True, copy=False, default='draft', |
|||
help=" * The 'Draft' status is used when a transfer is created and unconfirmed Transfer.\n" |
|||
" * The 'Transferred' status is used when the user confirm the transfer. It stays in the open status till the other branch/company receive the employee.\n" |
|||
" * The 'Done' status is set automatically when the employee is Joined/Received.\n" |
|||
" * The 'Cancelled' status is used when user cancel Transfer." |
|||
) |
|||
sequence_number = fields.Integer(string='Sequence Number', help='A unique sequence number for the Transfer', |
|||
default=1, copy=False) |
|||
company_id = fields.Many2one('res.company', string='Company', required=True, |
|||
related='employee_id.company_id', store=True) |
|||
note = fields.Text(string='Internal Notes') |
|||
responsible = fields.Many2one('hr.employee', string='Responsible', default=_default_employee, readonly=True) |
|||
|
|||
@api.one |
|||
def transfer(self): |
|||
obj_emp = self.env['hr.employee'].browse(self.employee_id.id) |
|||
emp = {} |
|||
if not self.branch: |
|||
raise Warning(_( |
|||
'You should select the transfer branch/company.')) |
|||
for this in self: |
|||
emp = { |
|||
'name': self.employee_id.name, |
|||
'company_id': self.branch.company_id, |
|||
|
|||
} |
|||
new_emp = self.env['hr.employee'].create(emp) |
|||
if obj_emp.address_home_id: |
|||
obj_emp.address_home_id.active = False |
|||
for obj_contract in self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]): |
|||
if obj_contract.date_end: |
|||
continue |
|||
if not obj_contract.date_end: |
|||
obj_contract.write({'date_end': date.today().strftime(DEFAULT_SERVER_DATE_FORMAT)}) |
|||
self.wage = obj_contract.wage |
|||
self.state = 'transfer' |
|||
self.employee_id = new_emp |
|||
obj_emp.write({'active': False}) |
|||
|
|||
@api.multi |
|||
def receive_employee(self): |
|||
for this in self: |
|||
if this._context is None: |
|||
context = {} |
|||
partner = {} |
|||
for i in this: |
|||
partner = { |
|||
'name': i.employee_id.name, |
|||
'company_id': i.branch.company_id, |
|||
} |
|||
partner_created = self.env['res.partner'].create(partner) |
|||
self.env['hr.employee'].browse(this.employee_id.id).write({'address_home_id': partner_created.id}) |
|||
return { |
|||
'name': _('Contract'), |
|||
'view_type': 'form', |
|||
'view_mode': 'form', |
|||
'res_model': 'hr.contract', |
|||
'type': 'ir.actions.act_window', |
|||
'target': 'current', |
|||
'context': {'default_employee_id': this.employee_id.id, |
|||
'default_date_start': this.date, |
|||
'default_emp_transfer': this.id, |
|||
}, |
|||
} |
|||
|
|||
@api.one |
|||
def cancel_transfer(self): |
|||
obj_emp = self.env['hr.employee'].browse(self.employee_id.id) |
|||
emp = { |
|||
'name': self.employee_id.name, |
|||
'company_id': self.company_id.id, |
|||
} |
|||
obj_emp.write(emp) |
|||
for obj_contract in self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]): |
|||
obj_contract.unlink() |
|||
self.state = 'cancel' |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
vals['name'] = "Transfer Of " + self.env['hr.employee'].browse(vals['employee_id']).name |
|||
res = super(EmployeeTransfer, self).create(vals) |
|||
return res |
@ -1,16 +0,0 @@ |
|||
from odoo import models, fields, api |
|||
|
|||
|
|||
class HrContract(models.Model): |
|||
_inherit = 'hr.contract' |
|||
|
|||
company_id = fields.Many2one('res.company', 'Company', default=lambda self: self.env.user.company_id) |
|||
from_transfer = fields.Boolean(string='Transferred', default=False) |
|||
emp_transfer = fields.Many2one('employee.transfer', string='Transferred Employee') |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
res = super(HrContract, self).create(vals) |
|||
if res.emp_transfer: |
|||
self.env['employee.transfer'].browse(res.emp_transfer.id).write({'state': 'done'}) |
|||
return res |
@ -1,19 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import models, fields, api |
|||
|
|||
|
|||
class HrContract(models.Model): |
|||
_inherit = 'hr.employee' |
|||
|
|||
transfer_detail = fields.One2many('transfer.detail', 'employee_id', string='Transfer Details') |
|||
|
|||
|
|||
class TransferDetails(models.Model): |
|||
|
|||
_name = 'transfer.detail' |
|||
_description = 'Transfer Details' |
|||
|
|||
employee_id = fields.Many2one('hr.employee', string='Employee') |
|||
date = fields.Date(string='Date', copy=False) |
|||
company_id = fields.Many2one('res.company', string='Company') |
|||
pre_company = fields.Many2one('res.company', string='Previous Company') |
@ -1,40 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import models, fields, api |
|||
|
|||
|
|||
class EmployeeTransfer(models.Model): |
|||
_name = 'transfer.company' |
|||
_description = 'Transfer Company' |
|||
_order = "id desc" |
|||
|
|||
name = fields.Char(string='Name', copy=False, ondelete='cascade') |
|||
company_id = fields.Integer(string='Company', help='Company name same as res.company', copy=False) |
|||
|
|||
|
|||
class ResCompany(models.Model): |
|||
_inherit = 'res.company' |
|||
|
|||
def init(self): |
|||
obj_company = self.env['res.company'].search([]) |
|||
|
|||
for company in obj_company: |
|||
obj_branch = self.env['transfer.company'].search([('company_id', '=', company.id)]) |
|||
com = {} |
|||
if not obj_branch: |
|||
com = { |
|||
'name': company.name, |
|||
'company_id': company.id, |
|||
} |
|||
obj = self.env['transfer.company'].create(com) |
|||
|
|||
@api.model |
|||
def create(self, res): |
|||
result = super(ResCompany, self).create(res) |
|||
com = {} |
|||
com = { |
|||
'name': result.name, |
|||
'company_id': result.id, |
|||
|
|||
} |
|||
self.env['transfer.company'].create(com) |
|||
return result |
@ -1,18 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="employee_rule" model="ir.rule"> |
|||
<field name="name">Employee Rule</field> |
|||
<field name="model_id" ref="hr.model_hr_employee"/> |
|||
<field name="global" eval="True"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="employee_contract_rule" model="ir.rule"> |
|||
<field name="name">Contract Rules</field> |
|||
<field name="model_id" ref="hr_contract.model_hr_contract"/> |
|||
<field name="global" eval="True"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 33 KiB |
@ -1,111 +0,0 @@ |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Open HRMS</h2> |
|||
<h3 class="oe_slogan">Most advanced open source HR management software</h3> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced oe_mt32"> |
|||
<div class="oe_span"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<a href="https://www.openhrms.com/#request-demo"> |
|||
<img src="HRMS-BUTTON.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Branch Transfer</h2> |
|||
<h3 class="oe_slogan">Employee transfer between branches</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
<div class="oe_row oe_spaced" style="padding-left:65px;"> |
|||
<h4>Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑ </span> Transfer Employee between branches.<br/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container "> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32 text-justify" style="text-align: center;"> |
|||
Transferring employees between company is a basic thing in a organization. Now Odoo lacks a provision for employee transfer. This module gives a basic structure for employee transfer<br/> |
|||
Make sure that you are multi company is enabled. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Employee Transfer</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Create a Employee Transfer.<br> |
|||
☛ Select the Transfer Company.<br> |
|||
☛ Click on the sent button.<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="create_a_transfer.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container "> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Contract</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Create new contract.<br> |
|||
<p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="create_contract.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<div class="row section-content"> |
|||
<div class="col-md-6 img-content"> |
|||
<h3>Our Odoo Services</h3> |
|||
|
|||
|
|||
</div> <div class="bc-span col-md-12"><div class="inner-span"><a target="_blank" href="https://www.openhrms.com"><img class="img-border img-responsive thumbnail" src="cybro-service.png"></a></div></div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/" target="_blank"><i |
|||
class="fa fa-phone"></i> Contact Us </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.odoo.com/apps/modules/browse?search=open+hrms" target="_blank"><i |
|||
class="fa fa-suitcase"></i> Other Open HRMS Addons </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"><i |
|||
class="fa fa-wrench"></i> Request Customization </a> |
|||
|
|||
</div> |
|||
<br> |
|||
<a href="https://www.cybrosys.com/" target="_blank"> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</a> |
|||
</div> |
|||
</section> |
@ -1,80 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<record id="employee_transfer" model="ir.ui.view"> |
|||
<field name="name">Employee Transfer</field> |
|||
<field name="model">employee.transfer</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Employee Transfer"> |
|||
<header> |
|||
<button name="transfer" string="Transfer" class="oe_highlight" type="object" states="draft" |
|||
groups="hr.group_hr_manager"/> |
|||
<button name="receive_employee" string="Receive" class="oe_highlight" type="object" |
|||
groups="hr.group_hr_manager" states="transfer"/> |
|||
<button name="cancel_transfer" string="Cancel" type="object" |
|||
attrs="{'invisible':[('state','in',('draft', 'cancel'))]}" groups="hr.group_hr_manager"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,transfer,done" /> |
|||
</header> |
|||
<sheet> |
|||
<div class="oe_title oe_left"> |
|||
<h2> |
|||
<field name="name" class="oe_inline" placeholder="Name"/> |
|||
</h2> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="employee_id" options="{'no_create': True}" attrs="{'readonly' : [('state', '!=', 'draft')] }"/> |
|||
<field name="date" attrs="{'readonly' : [('state', '!=', 'draft')] }"/> |
|||
<field name="branch" groups="base.group_multi_company" options="{'no_create': True}" |
|||
attrs="{'readonly' : [('state', '!=', 'draft')] }"/> |
|||
</group> |
|||
<group> |
|||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> |
|||
<field name="responsible" options="{'no_create': True}"/> |
|||
</group> |
|||
</group> |
|||
<notebook colspan="4"> |
|||
<page string="Internal Notes" > |
|||
<field name="note"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="employee_transfer_tree" model="ir.ui.view"> |
|||
<field name="name">Employee Transfer Tree</field> |
|||
<field name="model">employee.transfer</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Employee Transfer" decoration-info="state == 'draft'" decoration-muted="state in ('done','cancel')"> |
|||
<field name="name"/> |
|||
<field name="employee_id"/> |
|||
<field name="date"/> |
|||
<field name="branch" groups="base.group_multi_company"/> |
|||
<!--<field name="amount_total" sum="Amount total" widget="monetary"/>--> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_employee_transfer" model="ir.actions.act_window"> |
|||
<field name="name">Employee Transfer</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">employee.transfer</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="view_id" eval="False"/> |
|||
<field name="domain">[]</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to create a new Transfer. |
|||
</p><p> |
|||
Use this menu to browse previous transfer. To record new |
|||
transfer, you may use the create button. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!--<menuitem id="menu_transfer_root" name="Employee Transfer" parent="hr.menu_hr_root" sequence="2" groups="hr.group_hr_manager"/>--> |
|||
<menuitem id="menu_employee_transfer" name="Employee Transfer" parent="hr_employee_updation.menu_hr_management" sequence="3" |
|||
action="action_employee_transfer" groups="hr.group_hr_manager"/> |
|||
</odoo> |
@ -1,17 +0,0 @@ |
|||
Open HRMS Employee Info |
|||
----------------------- |
|||
Supporting Addon for Open HRMS, Added Advanced Fields On Employee Master. |
|||
|
|||
Connect with experts |
|||
-------------------- |
|||
|
|||
If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. |
|||
|
|||
Contacts |
|||
-------- |
|||
info - info@cybrosys.com |
|||
Jesni Banu - jesni@cybrosys.in |
|||
|
|||
Website: |
|||
https://www.openhrms.com |
|||
https://www.cybrosys.com |
@ -1,25 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import models |
|||
|
|||
|
@ -1,44 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
{ |
|||
'name': 'Open HRMS Employee Info', |
|||
'version': '11.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', |
|||
'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, |
|||
} |
@ -1,11 +0,0 @@ |
|||
## Module <hr_employee_updation> |
|||
|
|||
#### 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 |
@ -1,27 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import hr_employee |
|||
|
|||
|
|||
|
|||
|
@ -1,112 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from datetime import datetime, timedelta |
|||
from odoo import models, fields, _ |
|||
|
|||
GENDER_SELECTION = [('male', 'Male'), |
|||
('female', 'Female'), |
|||
('other', 'Other')] |
|||
|
|||
|
|||
class HrEmployeeContractName(models.Model): |
|||
"""This class is to add emergency contact table""" |
|||
|
|||
_name = 'hr.emergency.contact' |
|||
_description = 'HR Emergency Contact' |
|||
|
|||
number = fields.Char(string='Number', help='Contact Number') |
|||
relation = fields.Char(string='Contact', help='Relation with employee') |
|||
employee_obj = fields.Many2one('hr.employee', invisible=1) |
|||
|
|||
|
|||
class HrEmployeeFamilyInfo(models.Model): |
|||
"""Table for keep employee family information""" |
|||
|
|||
_name = 'hr.employee.family' |
|||
_description = 'HR Employee Family' |
|||
|
|||
member_name = fields.Char(string='Name', related='employee_ref.name', store=True) |
|||
employee_ref = fields.Many2one(string="Is Employee", |
|||
help='If family member currently is an employee of same company, ' |
|||
'then please tick this field', |
|||
comodel_name='hr.employee') |
|||
employee_id = fields.Many2one(string="Employee", help='Select corresponding Employee', comodel_name='hr.employee', |
|||
invisible=1) |
|||
relation = fields.Selection([('father', 'Father'), |
|||
('mother', 'Mother'), |
|||
('daughter', 'Daughter'), |
|||
('son', 'Son'), |
|||
('wife', 'Wife')], string='Relationship', help='Relation with employee') |
|||
member_contact = fields.Char(string='Contact No', related='employee_ref.personal_mobile', store=True) |
|||
|
|||
|
|||
class HrEmployee(models.Model): |
|||
_inherit = 'hr.employee' |
|||
|
|||
def mail_reminder(self): |
|||
"""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 + ",<br>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 + ",<br>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) |
|||
emergency_contact = fields.One2many('hr.emergency.contact', 'employee_obj', string='Emergency Contact') |
|||
joining_date = fields.Date(string='Joining Date') |
|||
id_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Identification ID') |
|||
passport_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Passport ID') |
|||
id_attachment_id = fields.Many2many('ir.attachment', 'id_attachment_rel', 'id_ref', 'attach_ref', |
|||
string="Attachment", help='You can attach the copy of your Id') |
|||
passport_attachment_id = fields.Many2many('ir.attachment', 'passport_attachment_rel', 'passport_ref', 'attach_ref1', |
|||
string="Attachment", |
|||
help='You can attach the copy of Passport') |
|||
fam_ids = fields.One2many('hr.employee.family', 'employee_id', string='Family', help='Family Information') |
|||
|
|||
|
|||
|
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 31 KiB |
@ -1,135 +0,0 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row"> |
|||
<h2 class="oe_slogan"><a href="https://www.openhrms.com">Open HRMS</a></h2> |
|||
<h3 class="oe_slogan">Most advanced open source HR management software</h3> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced oe_mt32"> |
|||
<div class="oe_span"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<a href="https://www.openhrms.com/#request-demo"> |
|||
<img src="HRMS-BUTTON.png"> |
|||
</a> |
|||
<div class="oe_demo_footer oe_centeralign">Online Demo</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Open HRMS Employee Info</h2> |
|||
<h3 class="oe_slogan">Added Advance Fields On Employee Master</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
<div class="oe_row oe_spaced" style="padding-left:65px;"> |
|||
<h4>Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑ </span> Added family information.<br/> |
|||
<span style="color:green;"> ☑ </span> Added joining date and contact info.<br/> |
|||
<span style="color:green;"> ☑ </span> Added passport and id expiry date and attachments.<br/> |
|||
<span style="color:green;"> ☑ </span> Added expiry notification for passport and id documents.<br/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32 text-justify" style="text-align: center;"> |
|||
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. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Identification ID & Passport ID</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="personal_info.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Emergency Contact Number</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="emergency_contact.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Family Information</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="family_info.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Joining Date</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="joining_date.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<div class="row section-content"> |
|||
<div class="col-md-6 img-content"> |
|||
<h3>Our Odoo Services</h3> |
|||
</div> |
|||
<div class="bc-span col-md-12"> |
|||
<div class="inner-span"> |
|||
<a target="_blank" href="https://www.openhrms.com"> |
|||
<img class="img-border img-responsive thumbnail" src="cybro-service.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/" target="_blank"><i |
|||
class="fa fa-phone"></i> Contact Us </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.odoo.com/apps/modules/browse?search=open+hrms" target="_blank"><i |
|||
class="fa fa-suitcase"></i> Other Open HRMS Addons </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"><i |
|||
class="fa fa-wrench"></i> Request Customization </a> |
|||
|
|||
</div> |
|||
<br> |
|||
<a href="https://www.cybrosys.com/" target="_blank"> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</a> |
|||
</div> |
|||
</section> |
|||
|
|||
|
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 55 KiB |
@ -1,84 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<menuitem id="employee_report_menu" name="Reports" parent="hr.menu_hr_root" sequence="30" |
|||
groups="hr.group_hr_manager,hr.group_hr_user"/> |
|||
<menuitem id="menu_hr_management" name="HR Management" parent="hr.menu_hr_root" sequence="5" |
|||
groups="hr.group_hr_manager,hr.group_hr_user"/> |
|||
<record model="ir.ui.view" id="hr_employee_inherit_form_view"> |
|||
<field name="name">hr.employee.form.view</field> |
|||
<field name="model">hr.employee</field> |
|||
<field name="inherit_id" ref="hr.view_employee_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//page[@name='personal_information']/group" position="inside"> |
|||
<group name="emergency_contact" colspan="4" string="Emergency Contact"> |
|||
<field name="emergency_contact"> |
|||
<tree editable="bottom"> |
|||
<field name="number"/> |
|||
<field name="relation"/> |
|||
</tree> |
|||
</field> |
|||
</group> |
|||
</xpath> |
|||
<field name="address_home_id" position="after"> |
|||
<field name="personal_mobile"/> |
|||
</field> |
|||
<field name="user_id" position="after"> |
|||
<field name="joining_date"/> |
|||
</field> |
|||
<field name="identification_id" position="replace"/> |
|||
<field name="passport_id" position="replace"/> |
|||
<xpath expr="//page[@name='personal_information']/group/group[1]" position="after"> |
|||
<group name="identification_id" string="Identification ID"> |
|||
<field name="identification_id"/> |
|||
<field name="id_expiry_date" groups="hr.group_hr_user" attrs="{'invisible': [('identification_id', 'in', [None,False])]}"/> |
|||
<field name="id_attachment_id" groups="hr.group_hr_user" widget="many2many_binary" class="oe_inline" attrs="{'invisible': [('identification_id', 'in', [None,False])]}"/> |
|||
</group> |
|||
<group name="passport_id" string="Passport ID"> |
|||
<field name="passport_id"/> |
|||
<field name="passport_expiry_date" groups="hr.group_hr_user" attrs="{'invisible': [('passport_id', 'in', [None,False])]}"/> |
|||
<field name="passport_attachment_id" groups="hr.group_hr_user" widget="many2many_binary" class="oe_inline" attrs="{'invisible': [('passport_id', 'in', [None,False])]}"/> |
|||
</group> |
|||
</xpath> |
|||
|
|||
<page name="hr_settings" position="after"> |
|||
<page name="family_info" string="Family Information" groups="hr.group_hr_user"> |
|||
<group string="Family"> |
|||
<field name="fam_ids" nolabel="1"> |
|||
<tree editable="bottom"> |
|||
<field name="member_name"/> |
|||
<field name="relation"/> |
|||
<field name="member_contact"/> |
|||
</tree> |
|||
</field> |
|||
</group> |
|||
</page> |
|||
</page> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_gamification.hr_hr_employee_view_form" model="ir.ui.view"> |
|||
<field name="name">hr.employee.view.form.inherit</field> |
|||
<field name="model">hr.employee</field> |
|||
<field name="inherit_id" ref="hr.view_employee_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//page[@name='public']" position="after"> |
|||
<page string="Received Badges" attrs="{'invisible': [('user_id', '=', False)]}"> |
|||
<div name="badges" groups="hr.group_hr_user"> |
|||
<field name="has_badges" invisible="1"/> |
|||
<button string="Grant a Badge" type="action" name="%(hr_gamification.action_reward_wizard)d"/> to reward this employee for a good action |
|||
<div class="oe_view_nocontent" attrs="{'invisible': [('has_badges', '=', True)]}"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to grant this employee his first badge |
|||
</p><p class="oe_grey"> |
|||
Badges are rewards of good work. Give them to people you believe deserve it. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
<field name="badge_ids" widget="many2many_kanban" /> |
|||
</page> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,15 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.cron" id="employee_data_reminder"> |
|||
<field name="name">HR Employee Data Expiration</field> |
|||
<field name="interval_number">1</field> |
|||
<field name="interval_type">days</field> |
|||
<field name="numbercall">-1</field> |
|||
<field name="doall" eval="False"/> |
|||
<field name="model_id" ref="model_hr_employee"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model.mail_reminder()</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,17 +0,0 @@ |
|||
OHRMS Multi Company |
|||
--------------------- |
|||
Supporting Addon for Open HRMS, Added Advance Fields On Employee Master |
|||
|
|||
Connect with experts |
|||
-------------------- |
|||
|
|||
If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. |
|||
|
|||
Contacts |
|||
-------- |
|||
info - info@cybrosys.com |
|||
Jesni Banu - jesni@cybrosys.in |
|||
|
|||
Website: |
|||
https://www.openhrms.com |
|||
https://www.cybrosys.com |
@ -1,25 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import models |
|||
|
|||
|
@ -1,43 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
{ |
|||
'name': 'Open HRMS Multi-Company', |
|||
'version': '11.0.1.0.0', |
|||
'summary': """Enables Multi-Company""", |
|||
'description': 'This module enables multi company features', |
|||
'category': 'Generic Modules/Human Resources', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.openhrms.com", |
|||
'depends': ['base', 'hr_contract', 'hr_payroll', 'hr_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, |
|||
} |
@ -1,6 +0,0 @@ |
|||
## Module <hr_multi_company> |
|||
|
|||
#### 30.03.2018 |
|||
#### Version 11.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Open HRMS Project |
@ -1,24 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import hr_multi_company |
|||
|
@ -1,51 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Jesni Banu (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class HrAttendanceMultiCompany(models.Model): |
|||
_inherit = 'hr.attendance' |
|||
|
|||
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
|
|||
|
|||
class HrLeaveMultiCompany(models.Model): |
|||
_inherit = 'hr.holidays' |
|||
|
|||
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
|
|||
|
|||
class HrPayslipMultiCompany(models.Model): |
|||
_inherit = 'hr.payslip.run' |
|||
|
|||
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
|
|||
|
|||
class HrSalaryCategoryMultiCompany(models.Model): |
|||
_inherit = 'hr.salary.rule.category' |
|||
|
|||
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True, |
|||
default=lambda self: self.env.user.company_id) |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 36 KiB |
@ -1,108 +0,0 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row"> |
|||
<h2 class="oe_slogan"><a href="https://www.openhrms.com">Open HRMS</a></h2> |
|||
<h3 class="oe_slogan">Most advanced open source HR management software</h3> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced oe_mt32"> |
|||
<div class="oe_span"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<a href="https://www.openhrms.com/#request-demo"> |
|||
<img src="HRMS-BUTTON.png"> |
|||
</a> |
|||
<div class="oe_demo_footer oe_centeralign">Online Demo</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Open HRMS Multi Company</h2> |
|||
<h3 class="oe_slogan">Managing Multi Company In HR Processes</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
<div class="oe_row oe_spaced" style="padding-left:65px;"> |
|||
<h4>Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑ </span>Managing multi company.<br/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32 text-justify" style="text-align: center;"> |
|||
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. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Multi Company In Leaves</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="multi_company.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Multi Company In Attendance</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="oh_attendance.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<div class="row section-content"> |
|||
<div class="col-md-6 img-content"> |
|||
<h3>Our Odoo Services</h3> |
|||
</div> |
|||
<div class="bc-span col-md-12"> |
|||
<div class="inner-span"> |
|||
<a target="_blank" href="https://www.openhrms.com"> |
|||
<img class="img-border img-responsive thumbnail" src="cybro-service.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/" target="_blank"><i |
|||
class="fa fa-phone"></i> Contact Us </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.odoo.com/apps/modules/browse?search=open+hrms" target="_blank"><i |
|||
class="fa fa-suitcase"></i> Other Open HRMS Addons </a> |
|||
|
|||
<a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"><i |
|||
class="fa fa-wrench"></i> Request Customization </a> |
|||
|
|||
</div> |
|||
<br> |
|||
<a href="https://www.cybrosys.com/" target="_blank"> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</a> |
|||
</div> |
|||
</section> |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 30 KiB |
@ -1,57 +0,0 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
<record model="ir.ui.view" id="hr_holidays_inherit_form_view1"> |
|||
<field name="name">hr.holidays.form.view1</field> |
|||
<field name="model">hr.holidays</field> |
|||
<field name="inherit_id" ref="hr_holidays.edit_holiday_new"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="department_id" position="after"> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="hr_contract_inherit_form_view1"> |
|||
<field name="name">hr.contract.form.view1</field> |
|||
<field name="model">hr.contract</field> |
|||
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="job_id" position="after"> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="hr_attendance_inherit_form_view1"> |
|||
<field name="name">hr.attendance.form.view1</field> |
|||
<field name="model">hr.attendance</field> |
|||
<field name="inherit_id" ref="hr_attendance.hr_attendance_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="check_out" position="after"> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="hr_payslip_batch_inherit_form_view1"> |
|||
<field name="name">hr.payslip.run.form.view1</field> |
|||
<field name="model">hr.payslip.run</field> |
|||
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="credit_note" position="after"> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="hr_salary_category_inherit_form_view1"> |
|||
<field name="name">hr.salary.rule.category.form.view1</field> |
|||
<field name="model">hr.salary.rule.category</field> |
|||
<field name="inherit_id" ref="hr_payroll.hr_salary_rule_category_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="code" position="after"> |
|||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -1,72 +0,0 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
<record id="property_rule_department" model="ir.rule"> |
|||
<field name="name">Department Create, Write, Unlink</field> |
|||
<field name="model_id" ref="hr.model_hr_department"/> |
|||
<field eval="True" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_salary_rules_company" model="ir.rule"> |
|||
<field name="name">Salary rules of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_salary_rule"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_structure_company" model="ir.rule"> |
|||
<field name="name">Salary structures of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_payroll_structure"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_batches_company" model="ir.rule"> |
|||
<field name="name">Payslips batches of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_payslip"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_payslip_company" model="ir.rule"> |
|||
<field name="name">Payslips of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_payslip_run"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_salary_category_company" model="ir.rule"> |
|||
<field name="name">Salary Category of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_salary_rule_category"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_contribution_company" model="ir.rule"> |
|||
<field name="name">Payslips Contribution of my Company</field> |
|||
<field name="model_id" ref="hr_payroll.model_hr_contribution_register"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_attendance_company" model="ir.rule"> |
|||
<field name="name">Attendance of my Company</field> |
|||
<field name="model_id" ref="hr_attendance.model_hr_attendance"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_holidays_company" model="ir.rule"> |
|||
<field name="name">Holidays of my Company</field> |
|||
<field name="model_id" ref="hr_holidays.model_hr_holidays"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record id="hr_expense_company" model="ir.rule"> |
|||
<field name="name">Expense of my Company</field> |
|||
<field name="model_id" ref="hr_expense.model_hr_expense"/> |
|||
<field eval="False" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
</odoo> |
@ -1,43 +0,0 @@ |
|||
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 <https://www.cybrosys.com> |
|||
|
|||
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. |
@ -1,23 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Saritha Sahadevan (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import models |
@ -1,45 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Saritha Sahadevan (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
{ |
|||
'name': "Open HRMS Employee Appraisal", |
|||
'version': '11.0.1.0.0', |
|||
'summary': """Roll out appraisal plans and get the best of your workforce""", |
|||
'description': """Roll out appraisal plans and get the best of your workforce""", |
|||
'category': 'Human Resources', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.openhrms.com", |
|||
'depends': ['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, |
|||
} |
@ -1,24 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="hr_appraisal_start" model="hr.appraisal.stages"> |
|||
<field name="name">To Start</field> |
|||
<field name="sequence">1</field> |
|||
</record> |
|||
|
|||
<record id="hr_appraisal_sent" model="hr.appraisal.stages"> |
|||
<field name="name">Sent Mail</field> |
|||
<field name="sequence">2</field> |
|||
</record> |
|||
|
|||
<record id="hr_appraisal_done" model="hr.appraisal.stages"> |
|||
<field name="name">Done</field> |
|||
<field name="sequence">3</field> |
|||
</record> |
|||
|
|||
<record id="hr_appraisal_cancel" model="hr.appraisal.stages"> |
|||
<field name="name">Cancel</field> |
|||
<field name="sequence">4</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -1,6 +0,0 @@ |
|||
## Module <oh_appraisal> |
|||
|
|||
#### 21.04.2018 |
|||
#### Version 11.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Open HRMS Project |
@ -1,23 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Saritha Sahadevan (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from . import hr_appraisal_survey, hr_appraisal_form |
@ -1,193 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Saritha Sahadevan (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
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.Date("From", required=True, readonly=True, default=fields.Datetime.now()) |
|||
tot_comp_survey = fields.Integer(string="Count Answers", compute="_compute_completed_survey") |
|||
tot_sent_survey = fields.Integer(string="Count Sent Questions") |
|||
created_by = fields.Many2one('res.users', string="Created By", default=lambda self: self.env.uid) |
|||
state = fields.Many2one('hr.appraisal.stages', string='Stage', track_visibility='onchange', index=True, |
|||
default=lambda self: self._default_stage_id(), |
|||
group_expand='_read_group_stage_ids') |
|||
# for coloring the kanban box |
|||
color = fields.Integer(string="Color Index") |
|||
check_sent = fields.Boolean(string="Check Sent Mail", default=False, copy=False) |
|||
check_draft = fields.Boolean(string="Check Draft", default=True, copy=False) |
|||
check_cancel = fields.Boolean(string="Check Cancel", default=False, copy=False) |
|||
check_done = fields.Boolean(string="Check Done", default=False, copy=False) |
|||
|
|||
@api.multi |
|||
def action_done(self): |
|||
rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 3)]) |
|||
self.state = rec.id |
|||
self.check_done = True |
|||
self.check_draft = False |
|||
|
|||
@api.multi |
|||
def action_set_draft(self): |
|||
rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 1)]) |
|||
self.state = rec.id |
|||
self.check_draft = True |
|||
self.check_sent = False |
|||
|
|||
@api.multi |
|||
def action_cancel(self): |
|||
rec = self.env['hr.appraisal.stages'].search([('sequence', '=', 4)]) |
|||
self.state = rec.id |
|||
self.check_cancel = True |
|||
self.check_draft = False |
|||
|
|||
@api.multi |
|||
def fetch_appraisal_reviewer(self): |
|||
appraisal_reviewers = [] |
|||
if self.hr_manager and self.hr_manager_id and self.manager_survey_id: |
|||
appraisal_reviewers.append((self.hr_manager_id, self.manager_survey_id)) |
|||
if self.hr_emp and self.emp_survey_id: |
|||
appraisal_reviewers.append((self.emp_id, self.emp_survey_id)) |
|||
if self.hr_colloborator and self.hr_colloborator_id and self.colloborator_survey_id: |
|||
appraisal_reviewers.append((self.hr_colloborator_id, self.colloborator_survey_id)) |
|||
if self.hr_colleague and self.hr_colleague_id and self.colleague_survey_id: |
|||
appraisal_reviewers.append((self.hr_colleague_id, self.colleague_survey_id)) |
|||
return appraisal_reviewers |
|||
|
|||
@api.multi |
|||
def action_start_appraisal(self): |
|||
""" This function will start the appraisal by sending emails to the corresponding employees |
|||
specified in the appraisal""" |
|||
send_count = 0 |
|||
appraisal_reviewers_list = self.fetch_appraisal_reviewer() |
|||
for appraisal_reviewers, survey_id in appraisal_reviewers_list: |
|||
for reviewers in appraisal_reviewers: |
|||
url = survey_id.public_url |
|||
response = self.env['survey.user_input'].create( |
|||
{'survey_id': survey_id.id, 'partner_id': reviewers.user_id.partner_id.id, |
|||
'appraisal_id': self.ids[0], 'deadline': self.appraisal_deadline, 'email': reviewers.user_id.email}) |
|||
token = response.token |
|||
if token: |
|||
url = url + '/' + token |
|||
mail_content = "Dear " + reviewers.name + "," + "<br>Please fill out the following survey " \ |
|||
"related to " + self.emp_id.name + "<br>Click here to access the survey.<br>" + \ |
|||
str(url) + "<br>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.') |
@ -1,29 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# A part of Open HRMS Project <https://www.openhrms.com> |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
|||
# Author: Saritha Sahadevan (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class SurveyInput(models.Model): |
|||
_inherit = 'survey.user_input' |
|||
|
|||
appraisal_id = fields.Many2one('hr.appraisal', string="Appriasal id") |
@ -1,56 +0,0 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
<record id="property_rule_hr_appraisal" model="ir.rule"> |
|||
<field name="name">Hr Appraisal Multi Company</field> |
|||
<field name="model_id" ref="model_hr_appraisal"/> |
|||
<field eval="True" name="global"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
|||
</record> |
|||
|
|||
<record model="ir.module.category" id="module_category_hr_appraisal"> |
|||
<field name="name">Appraisal</field> |
|||
<field name="description">Helps to evaluate employees...</field> |
|||
<field name="sequence">3</field> |
|||
</record> |
|||
|
|||
<record id="group_appraisal_employee" model="res.groups"> |
|||
<field name="name">Employee</field> |
|||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> |
|||
<field name="category_id" ref="oh_appraisal.module_category_hr_appraisal"/> |
|||
</record> |
|||
|
|||
<record id="group_appraisal_manager" model="res.groups"> |
|||
<field name="name">Manager</field> |
|||
<field name="category_id" ref="oh_appraisal.module_category_hr_appraisal"/> |
|||
<field name="implied_ids" eval="[(4, ref('group_appraisal_employee'))]"/> |
|||
<field name="users" eval="[(4, ref('base.user_root'))]"/> |
|||
</record> |
|||
|
|||
<record id="hr_appraisal_rule" model="ir.rule"> |
|||
<field name="name">Appraisal Forms</field> |
|||
<field name="domain_force">[('created_by','=',user.id)]</field> |
|||
<field name="global" eval="True"/> |
|||
<field name="model_id" ref="oh_appraisal.model_hr_appraisal"/> |
|||
<field name="groups" eval="[(4,ref('oh_appraisal.group_appraisal_employee'))]"/> |
|||
<field name="perm_write" eval="True"/> |
|||
<field name="perm_read" eval="True"/> |
|||
<field name="perm_create" eval="True"/> |
|||
<field name="perm_unlink" eval="True"/> |
|||
</record> |
|||
|
|||
<record id="hr_appraisal_manager_rule" model="ir.rule"> |
|||
<field name="name">Appraisal Forms</field> |
|||
<field name="global" eval="True"/> |
|||
<field name="model_id" ref="oh_appraisal.model_hr_appraisal"/> |
|||
<field name="groups" eval="[(4,ref('oh_appraisal.group_appraisal_manager'))]"/> |
|||
<field name="perm_write" eval="True"/> |
|||
<field name="perm_read" eval="True"/> |
|||
<field name="perm_create" eval="True"/> |
|||
<field name="perm_unlink" eval="True"/> |
|||
</record> |
|||
|
|||
<record id="survey.survey_input_users_access" model="ir.rule"> |
|||
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field> |
|||
</record> |
|||
|
|||
</odoo> |
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 12 KiB |