diff --git a/employee_orientation/README.rst b/employee_orientation/README.rst new file mode 100644 index 000000000..b7878f936 --- /dev/null +++ b/employee_orientation/README.rst @@ -0,0 +1,56 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Employee Orientation & Training +================= +This module developed to manage employee orientation & training programs. + +Configuration +============= +No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: + Anusha @cybrosys, + (V11) Niyas @cybrosys, + (V12) Kavya Raveendran, + (V13) Nimisha Murali, + (V14) Muhammed P, + (V15) Gion, + (V16) Sabeel B, + (V17) Jumana Haseen, +Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/employee_orientation/__init__.py b/employee_orientation/__init__.py new file mode 100644 index 000000000..e7912b57c --- /dev/null +++ b/employee_orientation/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import wizard diff --git a/employee_orientation/__manifest__.py b/employee_orientation/__manifest__.py new file mode 100644 index 000000000..16df38d5b --- /dev/null +++ b/employee_orientation/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Employee Orientation & Training", + 'version': '17.0.1.0.0', + 'category': "Human Resources", + 'summary': """Employee Orientation/Training Program Employee orientation by + which an employee acquires the necessary skills,knowledge, behaviors.""", + 'description': 'Complete Employee Orientation/Training Program acquire ' + 'the necessary skills,knowledge, behaviors, and contacts to' + ' effectively transition into a new organization.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'hr'], + 'data': [ + 'security/ir.model.access.csv', + 'data/employee_training_data.xml', + 'data/orientation_request_data.xml', + 'data/employee_orientation_data.xml', + 'views/checklist_line_views.xml', + 'views/employee_orientation_views.xml', + 'views/employee_training_views.xml', + 'views/orientation_checklist_views.xml', + 'views/orientation_request_views.xml', + 'report/print_pack_certificates_templates.xml', + 'report/print_pack_certificates_report.xml', + 'wizard/orientation_force_complete_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/employee_orientation/data/employee_orientation_data.xml b/employee_orientation/data/employee_orientation_data.xml new file mode 100644 index 000000000..6ec3ca8ba --- /dev/null +++ b/employee_orientation/data/employee_orientation_data.xml @@ -0,0 +1,13 @@ + + + + + + Employee Orientation + employee.orientation + OR + 3 + + + + diff --git a/employee_orientation/data/employee_training_data.xml b/employee_orientation/data/employee_training_data.xml new file mode 100644 index 000000000..c829f60f5 --- /dev/null +++ b/employee_orientation/data/employee_training_data.xml @@ -0,0 +1,82 @@ + + + + + + Employee Training program + {{(object.user_id.email or + object.company_id.email)}} + + {{(object.program_convener_id.login)}} + + Employee Training Request + + + +
+

+ Hello + , +

+

+ You are requested to conduct + + Training program for + + department + + from + + to + + + . +

+
+

+ Thank you! +

+
+
+

+ + + +

+
+
+ + + + + +
+ Phone: + +
+
+ +
+ Web : + + + +
+
+
+
+
+
+
+
diff --git a/employee_orientation/data/orientation_request_data.xml b/employee_orientation/data/orientation_request_data.xml new file mode 100644 index 000000000..e4d79004c --- /dev/null +++ b/employee_orientation/data/orientation_request_data.xml @@ -0,0 +1,84 @@ + + + + + + Employee Orientation Request + {{(object.user_id.login or + object.company_id.email)}} + + {{(object.partner_id.work_email)}} + Employee Orientation Request + + + +
+

+ Hello + , +

+

+ You are requested to conduct orientation program listed + below. +

+

+ Check Line: + +

+

+ Employee: + +

+ +

+ Expected Date: + +

+
+
+

+ Thank you! +

+
+
+

+ + + +

+
+
+ + + + +
+ Phone: + +
+
+ +
+ Web : + + + +
+
+
+
+
+
+
+
diff --git a/employee_orientation/doc/RELEASE_NOTES.md b/employee_orientation/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..5a8354517 --- /dev/null +++ b/employee_orientation/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.12.2023 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Employee Orientation & Training diff --git a/employee_orientation/models/__init__.py b/employee_orientation/models/__init__.py new file mode 100644 index 000000000..264546c43 --- /dev/null +++ b/employee_orientation/models/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import checklist_line +from . import orientation_checklist +from . import employee_orientation +from . import orientation_request +from . import employee_training +from . import employee_orientation_report +from . import hr_employee diff --git a/employee_orientation/models/checklist_line.py b/employee_orientation/models/checklist_line.py new file mode 100644 index 000000000..a182f8b12 --- /dev/null +++ b/employee_orientation/models/checklist_line.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, fields + + +class ChecklistLine(models.Model): + """This class creates a model 'checklist.line' and adds required fields """ + _name = 'checklist.line' + _description = 'Checklist Line' + _rec_name = 'line_name' + + line_name = fields.Char(string='Name', required=True, + help="Checklist name.") + responsible_user_id = fields.Many2one('res.users', + string='Responsible User', + required=True, + help="Give the responsible user.") diff --git a/employee_orientation/models/employee_orientation.py b/employee_orientation/models/employee_orientation.py new file mode 100644 index 000000000..4c947c020 --- /dev/null +++ b/employee_orientation/models/employee_orientation.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models, _ + + +class Orientation(models.Model): + """This class creates a model 'employee.orientation' and adds fields,and + also inherits 'mail.thread'""" + _name = 'employee.orientation' + _description = "Employee Orientation" + _inherit = 'mail.thread' + + name = fields.Char(string='Employee Orientation', readonly=True, + default=lambda self: _('New'), + help="Sequence for employee orientation.") + employee_id = fields.Many2one('hr.employee', string='Employee', + required=True, + help="Name of the employee.") + department_id = fields.Many2one('hr.department', string='Department', + related='employee_id.department_id', + required=True, + help="Name of the department.") + date = fields.Datetime(string="Date", help="Current date for employee " + "orientation.") + responsible_user_id = fields.Many2one('res.users', + string='Responsible User', + help="Give the responsible user.") + employee_company_id = fields.Many2one('res.company', string='Company', + required=True, + default=lambda + self: self.env.user.company_id, + help="Mention the company.") + parent_id = fields.Many2one('hr.employee', string='Manager', + related='employee_id.parent_id', + help="Related manager.") + job_id = fields.Many2one('hr.job', string='Job Title', + related='employee_id.job_id', + domain="[('department_id', '=', department_id)]", + help="Mention the job title.") + orientation_id = fields.Many2one('orientation.checklist', + string='Orientation Checklist', + domain="[('checklist_department_id','='," + " department_id)]", + required=True, + help="Mention the Orientation Checklist.") + note = fields.Text('Description', help="Give the description if any.") + orientation_request_ids = fields.One2many('orientation.request', + 'request_orientation_id', + string='Orientation Request', + help="Orientation requests " + "of the employee.") + state = fields.Selection([ + ('draft', 'Draft'), + ('confirm', 'Confirmed'), + ('cancel', 'Canceled'), + ('complete', 'Completed'), + ], string='Status', readonly=True, copy=False, index=True, + default='draft', + help="Status of the employee orientation.") + + def action_confirm_orientation(self): + """Function execute on confirming orientation, state changes to + confirm""" + self.write({'state': 'confirm'}) + for values in self.orientation_id.checklist_line_ids: + self.env['orientation.request'].create({ + 'request_name': values.line_name, + 'request_orientation_id': self.id, + 'partner_id': values.responsible_user_id.id, + 'request_date': self.date, + 'employee_id': self.employee_id.id, + }) + + def action_cancel_orientation(self): + """Function on cancel orientation button,state changes to cancel""" + for request in self.orientation_request_ids: + request.state = 'cancel' + self.write({'state': 'cancel'}) + + def action_complete_orientation(self): + """Function on complete orientation button,state changes to complete""" + force_complete = False + for request in self.orientation_request_ids: + if request.state == 'new': + force_complete = True + if force_complete: + return { + 'name': 'Complete Orientation', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'orientation.force.complete', + 'type': 'ir.actions.act_window', + 'context': {'default_orientation_id': self.id}, + 'target': 'new', + } + self.write({'state': 'complete'}) + + @api.model + def create(self, vals): + """Function to create sequence for orientation""" + vals['name'] = self.env['ir.sequence'].next_by_code( + 'employee.orientation') + result = super(Orientation, self).create(vals) + return result diff --git a/employee_orientation/models/employee_orientation_report.py b/employee_orientation/models/employee_orientation_report.py new file mode 100644 index 000000000..9578920c4 --- /dev/null +++ b/employee_orientation/models/employee_orientation_report.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models + + +class PackingReportValues(models.AbstractModel): + """Model for report of employee orientation""" + _name = 'report.employee_orientation.print_pack_template' + _description = 'Employee Orientation Print report' + + @api.model + def _get_report_values(self, docids, data=None): + """Function execute on report values""" + lst = [] + empl_obj = self.env['hr.employee'].search( + [('department_id', '=', data['dept_id'])]) + docs = self.env['hr.employee'].browse(docids) + for line in empl_obj: + lst.append({ + 'doc_ids': docs.ids, + 'doc_model': 'hr.employee', + 'name': line.name, + 'department_id': line.department_id.name, + 'program_name': data['program_name'], + 'company_name': data['company_name'], + 'date_to': data['date_to'], + 'program_convener': data['program_convener'], + 'duration': data['duration'], + 'hours': data['hours'], + 'minutes': data['minutes'], + }) + return { + 'data': lst, + } diff --git a/employee_orientation/models/employee_training.py b/employee_orientation/models/employee_training.py new file mode 100644 index 000000000..1c4194820 --- /dev/null +++ b/employee_orientation/models/employee_training.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from dateutil.relativedelta import relativedelta +from datetime import datetime +from odoo import api, fields, models, _ + + +class EmployeeTraining(models.Model): + """This class creates a model employee training and adds fields""" + _name = 'employee.training' + _rec_name = 'program_name' + _description = "Employee Training" + _inherit = 'mail.thread' + + program_name = fields.Char(string='Training Program', required=True, + help="Program name in training.") + program_department_id = fields.Many2one('hr.department', + string='Department', required=True, + help="Department on training.") + program_convener_id = fields.Many2one('res.users', + string='Responsible User', + required=True, help="Responsible " + "person.") + training_ids = fields.One2many('hr.employee', string='Employee Details', + compute="_compute_employee_details", + help="Employee details on training.") + note_id = fields.Text('Description', help="Give the description" + " if any.") + date_from = fields.Datetime(string="Date From", help="Give the from date.") + date_to = fields.Datetime(string="Date To", help="Mention the to date.") + user_id = fields.Many2one('res.users', string='users', + default=lambda self: self.env.user, + help="Mention the user.") + company_id = fields.Many2one('res.company', string='Company', required=True, + default=lambda self: self.env.user.company_id, + help="Mention the company.") + state = fields.Selection([ + ('new', 'New'), + ('confirm', 'Confirmed'), + ('cancel', 'Canceled'), + ('complete', 'Completed'), + ('print', 'Print'), + ], string='Status', readonly=True, copy=False, index=True, + default='new', help="Status of training.") + + @api.depends('program_department_id') + def _compute_employee_details(self): + """Function to search for employee details""" + datas = self.env['hr.employee'].search( + [('department_id', '=', self.program_department_id.id)]) + self.training_ids = datas + + def print_event(self): + """Reports to print the event""" + self.ensure_one() + started_date = datetime.strftime(self.create_date, "%Y-%m-%d ") + duration = (self.write_date - self.create_date).days + pause = relativedelta(hours=0) + difference = relativedelta(self.write_date, self.create_date) - pause + hours = difference.hours + minutes = difference.minutes + data = { + 'dept_id': self.program_department_id.id, + 'program_name': self.program_name, + 'company_name': self.company_id.name, + 'date_to': started_date, + 'duration': duration, + 'hours': hours, + 'minutes': minutes, + 'program_convener': self.program_convener_id.name, + + } + return self.env.ref( + 'employee_orientation.print_pack_certificates').report_action(self, + data=data) + + def action_complete_event(self): + """Function executes if the event is completed and state changed to + complete""" + self.write({'state': 'complete'}) + + def action_confirm_event(self): + """Function executes if the event is confirmed and state changed to + confirm""" + self.write({'state': 'confirm'}) + + def action_cancel_event(self): + """Function executes if the event is cancelled and state changed to + cancel""" + self.write({'state': 'cancel'}) + + def action_confirm_send_mail(self): + """Function execute to confirm send mail and update values + """ + self.ensure_one() + ir_model_data = self.env['ir.model.data'] + try: + template_id = ir_model_data._xmlid_lookup( + 'employee_orientation.orientation_training_mailer')[2] + except ValueError: + template_id = False + try: + compose_form_id = ir_model_data._xmlid_lookup( + 'mail.email_compose_message_wizard_form')[2] + except ValueError: + compose_form_id = False + ctx = dict(self.env.context or {}) + ctx.update({ + 'default_model': 'employee.training', + 'default_res_id': self.ids[0], + 'default_use_template': bool(template_id), + 'default_template_id': template_id, + 'default_composition_mode': 'comment', + }) + return { + 'name': _('Compose Email'), + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'mail.compose.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } diff --git a/employee_orientation/models/hr_employee.py b/employee_orientation/models/hr_employee.py new file mode 100644 index 000000000..f30ae0a9d --- /dev/null +++ b/employee_orientation/models/hr_employee.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class HrEmployee(models.Model): + "This class inherits 'hr.employee'" + _inherit = 'hr.employee' + + certificates = fields.Boolean(default=True, string="Certificates", + help="Field to give certificates or not.") diff --git a/employee_orientation/models/orientation_checklist.py b/employee_orientation/models/orientation_checklist.py new file mode 100644 index 000000000..3f198790b --- /dev/null +++ b/employee_orientation/models/orientation_checklist.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, fields + + +class OrientationChecklist(models.Model): + """This class creates a model 'orientation.checklist' and added fields""" + _name = 'orientation.checklist' + _description = "Checklist" + _rec_name = 'checklist_name' + _inherit = 'mail.thread' + + checklist_name = fields.Char(string='Name', required=True, + help="Give the checklist name.") + checklist_department_id = fields.Many2one('hr.department', + string='Department', + required=True, + help="Give the corresponding" + "department.") + active = fields.Boolean(string='Active', default=True, + help="Set active to false to hide the Orientation " + "Checklist without removing it.") + checklist_line_ids = fields.Many2many('checklist.line', + 'checklist_line_rel', + help="Specify all the checklists.") diff --git a/employee_orientation/models/orientation_request.py b/employee_orientation/models/orientation_request.py new file mode 100644 index 000000000..e496d8e43 --- /dev/null +++ b/employee_orientation/models/orientation_request.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, fields, _ + + +class OrientationChecklistRequest(models.Model): + """This class creates a model 'orientation.request' and adds + required fields""" + _name = 'orientation.request' + _description = "Employee Orientation Request" + _rec_name = 'request_name' + _inherit = 'mail.thread' + + request_name = fields.Char(string='Name', help="Name the sequence") + request_orientation_id = fields.Many2one('employee.orientation', + string='Employee Orientation', + help="Give the employee " + "orientation.") + employee_company_id = fields.Many2one('res.company', + string='Employees Company', + required=True, + default=lambda + self: self.env.user.company_id, + help="Give the company.") + partner_id = fields.Many2one('res.users', + string='Responsible User', + help="Specify the responsible user.") + request_date = fields.Date(string="Date", help="Mention the request date.") + employee_id = fields.Many2one('hr.employee', string='Employee', + help="Give the employee name.") + request_expected_date = fields.Date(string="Expected Date", help="Request" + "expected " + "date.") + attachment_ids = fields.Many2many('ir.attachment', + 'orientation_rel_1', + string="Attachment", help="Attachments " + "related.") + note = fields.Text('Description', help="Give notes if any.") + user_id = fields.Many2one('res.users', string='users', + default=lambda self: self.env.user, + help="Give the user.") + company_id = fields.Many2one('res.company', + string='Company', required=True, + default=lambda self: self.env.user.company_id, + help="Give the related company.") + state = fields.Selection([ + ('new', 'New'), + ('cancel', 'Cancel'), + ('complete', 'Completed'), + ], string='Status', readonly=True, copy=False, index=True, + default='new', help="Status of the " + "request.") + + def action_confirm_send_mail(self): + """Function executes on confirming mail""" + self.ensure_one() + ir_model_data = self.env['ir.model.data'] + try: + template_id = ir_model_data._xmlid_lookup( + 'employee_orientation.orientation_request_mailer')[2] + print(template_id) + except ValueError: + template_id = False + try: + compose_form_id = ir_model_data._xmlid_lookup( + 'mail.email_compose_message_wizard_form')[2] + except ValueError: + compose_form_id = False + ctx = dict(self.env.context or {}) + ctx.update({ + 'default_model': 'orientation.request', + 'default_res_id': self.ids[0], + 'default_use_template': bool(template_id), + 'default_template_id': template_id, + 'default_composition_mode': 'comment', + }) + return { + 'name': _('Compose Email'), + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'mail.compose.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + + def action_confirm_request(self): + """Function on confirm button of request""" + self.write({'state': "complete"}) + + def action_cancel_request(self): + """Function on cancel button""" + self.write({'state': "cancel"}) diff --git a/employee_orientation/report/print_pack_certificates_report.xml b/employee_orientation/report/print_pack_certificates_report.xml new file mode 100644 index 000000000..53158252f --- /dev/null +++ b/employee_orientation/report/print_pack_certificates_report.xml @@ -0,0 +1,13 @@ + + + + + + Certificates + employee.training + qweb-pdf + employee_orientation.print_pack_template + employee_orientation.print_pack_template + + + diff --git a/employee_orientation/report/print_pack_certificates_templates.xml b/employee_orientation/report/print_pack_certificates_templates.xml new file mode 100644 index 000000000..04644eb3f --- /dev/null +++ b/employee_orientation/report/print_pack_certificates_templates.xml @@ -0,0 +1,89 @@ + + + + + + \ No newline at end of file diff --git a/employee_orientation/security/ir.model.access.csv b/employee_orientation/security/ir.model.access.csv new file mode 100644 index 000000000..f580dc3a2 --- /dev/null +++ b/employee_orientation/security/ir.model.access.csv @@ -0,0 +1,10 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_orientation_request_user,access.orientation.request user,model_orientation_request,hr.group_hr_user,1,1,1,1 +access_checklist_line_user,access.checklist.line user,model_checklist_line,hr.group_hr_user,1,1,1,1 +access_employee_orientation_user,access.employee.orientation user,model_employee_orientation,hr.group_hr_user,1,1,1,1 +access_employee_orientation_request_manager,access.orientation.checklist manager,model_orientation_checklist,hr.group_hr_user,1,1,1,1 +access_employee_training_user,access.employee.training user,model_employee_training,hr.group_hr_user,1,1,1,1 +access_employee_training_manager,access.employee.training manager,model_employee_training,base.group_user,1,1,0,0 +access_orientation_request_manager,access.orientation.request manager,model_orientation_request,base.group_user,1,1,0,0 +access_orientation_force_complete_user,access.orientation.force.complete user,model_orientation_force_complete,hr.group_hr_user,1,1,1,1 +access_orientation_checklist_user,access.orientation.checklist user,model_orientation_checklist,hr.group_hr_user,1,1,1,1 diff --git a/employee_orientation/static/description/assets/icons/capture (1).png b/employee_orientation/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/employee_orientation/static/description/assets/icons/capture (1).png differ diff --git a/employee_orientation/static/description/assets/icons/check.png b/employee_orientation/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/employee_orientation/static/description/assets/icons/check.png differ diff --git a/employee_orientation/static/description/assets/icons/chevron.png b/employee_orientation/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/chevron.png differ diff --git a/employee_orientation/static/description/assets/icons/cogs.png b/employee_orientation/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/cogs.png differ diff --git a/employee_orientation/static/description/assets/icons/consultation.png b/employee_orientation/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/employee_orientation/static/description/assets/icons/consultation.png differ diff --git a/employee_orientation/static/description/assets/icons/ecom-black.png b/employee_orientation/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/ecom-black.png differ diff --git a/employee_orientation/static/description/assets/icons/education-black.png b/employee_orientation/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/employee_orientation/static/description/assets/icons/education-black.png differ diff --git a/employee_orientation/static/description/assets/icons/hotel-black.png b/employee_orientation/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/employee_orientation/static/description/assets/icons/hotel-black.png differ diff --git a/employee_orientation/static/description/assets/icons/img.png b/employee_orientation/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/img.png differ diff --git a/employee_orientation/static/description/assets/icons/license.png b/employee_orientation/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/employee_orientation/static/description/assets/icons/license.png differ diff --git a/employee_orientation/static/description/assets/icons/lifebuoy.png b/employee_orientation/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/employee_orientation/static/description/assets/icons/lifebuoy.png differ diff --git a/employee_orientation/static/description/assets/icons/manufacturing-black.png b/employee_orientation/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/employee_orientation/static/description/assets/icons/manufacturing-black.png differ diff --git a/employee_orientation/static/description/assets/icons/photo-capture.png b/employee_orientation/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/photo-capture.png differ diff --git a/employee_orientation/static/description/assets/icons/pos-black.png b/employee_orientation/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/pos-black.png differ diff --git a/employee_orientation/static/description/assets/icons/puzzle.png b/employee_orientation/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/puzzle.png differ diff --git a/employee_orientation/static/description/assets/icons/restaurant-black.png b/employee_orientation/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/restaurant-black.png differ diff --git a/employee_orientation/static/description/assets/icons/service-black.png b/employee_orientation/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/employee_orientation/static/description/assets/icons/service-black.png differ diff --git a/employee_orientation/static/description/assets/icons/trading-black.png b/employee_orientation/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/employee_orientation/static/description/assets/icons/trading-black.png differ diff --git a/employee_orientation/static/description/assets/icons/training.png b/employee_orientation/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/employee_orientation/static/description/assets/icons/training.png differ diff --git a/employee_orientation/static/description/assets/icons/update.png b/employee_orientation/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/employee_orientation/static/description/assets/icons/update.png differ diff --git a/employee_orientation/static/description/assets/icons/user.png b/employee_orientation/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/employee_orientation/static/description/assets/icons/user.png differ diff --git a/employee_orientation/static/description/assets/icons/wrench.png b/employee_orientation/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/employee_orientation/static/description/assets/icons/wrench.png differ diff --git a/employee_orientation/static/description/assets/misc/Cybrosys R.png b/employee_orientation/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/employee_orientation/static/description/assets/misc/Cybrosys R.png differ diff --git a/employee_orientation/static/description/assets/misc/email.svg b/employee_orientation/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/employee_orientation/static/description/assets/misc/phone.svg b/employee_orientation/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/employee_orientation/static/description/assets/misc/star (1) 2.svg b/employee_orientation/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/employee_orientation/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/employee_orientation/static/description/assets/misc/support (1) 1.svg b/employee_orientation/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/employee_orientation/static/description/assets/misc/support-email.svg b/employee_orientation/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/employee_orientation/static/description/assets/misc/tick-mark.svg b/employee_orientation/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/employee_orientation/static/description/assets/misc/whatsapp 1.svg b/employee_orientation/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/employee_orientation/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/employee_orientation/static/description/assets/misc/whatsapp.svg b/employee_orientation/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/employee_orientation/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/employee_orientation/static/description/assets/modules/1.png b/employee_orientation/static/description/assets/modules/1.png new file mode 100644 index 000000000..9e7dc5960 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/1.png differ diff --git a/employee_orientation/static/description/assets/modules/2.png b/employee_orientation/static/description/assets/modules/2.png new file mode 100644 index 000000000..ca4eef0f0 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/2.png differ diff --git a/employee_orientation/static/description/assets/modules/3.png b/employee_orientation/static/description/assets/modules/3.png new file mode 100644 index 000000000..a3ec77673 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/3.png differ diff --git a/employee_orientation/static/description/assets/modules/4.png b/employee_orientation/static/description/assets/modules/4.png new file mode 100644 index 000000000..681eebf42 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/4.png differ diff --git a/employee_orientation/static/description/assets/modules/5.gif b/employee_orientation/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/5.gif differ diff --git a/employee_orientation/static/description/assets/modules/5.png b/employee_orientation/static/description/assets/modules/5.png new file mode 100644 index 000000000..b68592c0b Binary files /dev/null and b/employee_orientation/static/description/assets/modules/5.png differ diff --git a/employee_orientation/static/description/assets/modules/6.png b/employee_orientation/static/description/assets/modules/6.png new file mode 100644 index 000000000..cb8445657 Binary files /dev/null and b/employee_orientation/static/description/assets/modules/6.png differ diff --git a/employee_orientation/static/description/assets/screenshots/1.png b/employee_orientation/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..b6cf9cb79 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/1.png differ diff --git a/employee_orientation/static/description/assets/screenshots/2.png b/employee_orientation/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..3c8e601a9 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/2.png differ diff --git a/employee_orientation/static/description/assets/screenshots/3.png b/employee_orientation/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..c79eb4f45 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/3.png differ diff --git a/employee_orientation/static/description/assets/screenshots/4.png b/employee_orientation/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..10ecab36b Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/4.png differ diff --git a/employee_orientation/static/description/assets/screenshots/5.png b/employee_orientation/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..268356e1f Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/5.png differ diff --git a/employee_orientation/static/description/assets/screenshots/6.png b/employee_orientation/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..38344d8b3 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/6.png differ diff --git a/employee_orientation/static/description/assets/screenshots/7.png b/employee_orientation/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..bddf624c9 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/7.png differ diff --git a/employee_orientation/static/description/assets/screenshots/8.png b/employee_orientation/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..21b7507c4 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/8.png differ diff --git a/employee_orientation/static/description/assets/screenshots/9.png b/employee_orientation/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..5bc760546 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/9.png differ diff --git a/employee_orientation/static/description/assets/screenshots/hero.gif b/employee_orientation/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4eefc7058 Binary files /dev/null and b/employee_orientation/static/description/assets/screenshots/hero.gif differ diff --git a/employee_orientation/static/description/banner.png b/employee_orientation/static/description/banner.png new file mode 100644 index 000000000..330b49292 Binary files /dev/null and b/employee_orientation/static/description/banner.png differ diff --git a/employee_orientation/static/description/icon.png b/employee_orientation/static/description/icon.png new file mode 100644 index 000000000..8b4f7d4c5 Binary files /dev/null and b/employee_orientation/static/description/icon.png differ diff --git a/employee_orientation/static/description/index.html b/employee_orientation/static/description/index.html new file mode 100644 index 000000000..9c1984839 --- /dev/null +++ b/employee_orientation/static/description/index.html @@ -0,0 +1,807 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Employee Orientation & Training

+

+ This help employee to acquire the necessary skills, + knowledge, behaviors, and contacts to effectively transition into a new organization. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Employee Orientation Programs

+

Employee orientation by + which an employee acquires the necessary + skills,knowledge, behaviors. +

+
+
+
+
+
+
+ +
+
+

+ Employee training

+

It can enhance the + overall satisfaction of employees and help + increase turnover and productivity. +

+
+
+
+
+
+
+ +
+
+

+ Orientation Request

+

Confirming orientation + will create orientation requests automatically. +

+
+
+
+
+
+
+ +
+
+

+ Print Certificates

+

Certificates can be + printed for the training and + orientation programs +

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Orientation Checklist for each employee in orientation

+
+
+
+
+
+
+ +
+
+

+ Orientation Checklist Lines in each checklist can be seen here

+
+
+
+
+
+
+ +
+
+

+ Employee Orientation details

+
+
+
+
+
+
+ +
+
+

+ Automatic creation of checklist lines

+
+
+
+
+
+
+ +
+
+

+ Orientation Request:Confirming orientation + will create orientation requests + automatically.

+
+
+
+
+
+
+ +
+
+

+ Orientation requests with the corresponding employee orientation are added

+
+
+
+
+
+
+ +
+
+

+ Email Template for sending email about the training program

+
+
+
+
+
+
+ +
+
+

+ Employee Training details about training program,department and dates

+
+
+
+
+
+
+ +
+
+

+ Print Certificates: Book issued history in each book.

+
+
+
+
+
+
+
    +
  • + Employee Orientation and Employee Training +
  • +
  • + Orientation Request created on confirming orientation. +
  • +
  • + Employee Orientation & Training. +
      +
    • Complete Employee Orientation/Training Program
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:18th December 2023 +
+

+ Initial Commit for Employee Orientation & Training.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/employee_orientation/views/checklist_line_views.xml b/employee_orientation/views/checklist_line_views.xml new file mode 100644 index 000000000..f1e81ba72 --- /dev/null +++ b/employee_orientation/views/checklist_line_views.xml @@ -0,0 +1,77 @@ + + + + + checklist.line.view.tree + checklist.line + + + + + + + + + + + checklist.line.view.form + checklist.line + + +
+ + + + + + +
+
+
+ + + checklist.line.view.search + checklist.line + + + + + + + + + + + Orientation Checklist Line + ir.actions.act_window + checklist.line + tree,form + + + + Create Orientation Checklists Lines. + + + + + + + +
diff --git a/employee_orientation/views/employee_orientation_views.xml b/employee_orientation/views/employee_orientation_views.xml new file mode 100644 index 000000000..a0290b533 --- /dev/null +++ b/employee_orientation/views/employee_orientation_views.xml @@ -0,0 +1,129 @@ + + + + + employee.orientation.view.tree + employee.orientation + + + + + + + + + + + + + employee.orientation.view.form + employee.orientation + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+
+ + + employee.orientation.view.search + employee.orientation + + + + + + + + + Employee Orientation + ir.actions.act_window + employee.orientation + tree,form + + + + Create Employee Orientation. + + + + + +
diff --git a/employee_orientation/views/employee_training_views.xml b/employee_orientation/views/employee_training_views.xml new file mode 100644 index 000000000..94883aff7 --- /dev/null +++ b/employee_orientation/views/employee_training_views.xml @@ -0,0 +1,122 @@ + + + + + employee.training.view.tree + employee.training + + + + + + + + + + + + employee.training.view.form + employee.training + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ + + employee.training.view.search + employee.training + + + + + + + + + + Employee Training Program + ir.actions.act_window + employee.training + tree,form + + [] + {} + + + Create Employee Training Program. + + + + + + hr.employee.view.form.inherit.employee.orientation + hr.employee + + 30 + + + + + + +
diff --git a/employee_orientation/views/orientation_checklist_views.xml b/employee_orientation/views/orientation_checklist_views.xml new file mode 100644 index 000000000..399e7c3c9 --- /dev/null +++ b/employee_orientation/views/orientation_checklist_views.xml @@ -0,0 +1,82 @@ + + + + + orientation.checklist.view.tree + orientation.checklist + + + + + + + + + + + orientation.checklist.view.form + orientation.checklist + + +
+ + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ + + orientation.checklist.view.search + orientation.checklist + + + + + + + + + + + Orientation Checklist + ir.actions.act_window + orientation.checklist + tree,form + + {'search_default_active': True} + + + Create Orientation Checklists. + + + + + +
diff --git a/employee_orientation/views/orientation_request_views.xml b/employee_orientation/views/orientation_request_views.xml new file mode 100644 index 000000000..2614c9e55 --- /dev/null +++ b/employee_orientation/views/orientation_request_views.xml @@ -0,0 +1,95 @@ + + + + + orientation.request.view_tree + orientation.request + + + + + + + + + + + + orientation.request.view.form + orientation.request + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ + + orientation.request.view_search + orientation.request + + + + + + + + + + Orientation Request + ir.actions.act_window + orientation.request + tree,form + + + + Create Orientation Requests. + + + + + +
diff --git a/employee_orientation/wizard/__init__.py b/employee_orientation/wizard/__init__.py new file mode 100644 index 000000000..bb83abc84 --- /dev/null +++ b/employee_orientation/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import orientation_force_complete diff --git a/employee_orientation/wizard/orientation_force_complete.py b/employee_orientation/wizard/orientation_force_complete.py new file mode 100644 index 000000000..3220856ca --- /dev/null +++ b/employee_orientation/wizard/orientation_force_complete.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class OrientationForceComplete(models.TransientModel): + """This class creates a model 'orientation.force.complete' + and added required fields""" + _name = 'orientation.force.complete' + _description = "Orientation Force Complete" + + name = fields.Char(string="Name") + orientation_id = fields.Many2one('employee.orientation', + string='Orientation', help="Orientation " + "name.") + orientation_lines = fields.One2many('orientation.request', + string='Orientation Lines', + compute='_compute_pending_lines', + help="Orientation lines.") + + @api.onchange('orientation_id') + def _compute_pending_lines(self): + """Function to update orientation lines on changing of orientation""" + pending = [] + for data in self.orientation_id.orientation_request_ids: + if data.state == 'new': + pending.append(data.id) + self.update({'orientation_lines': pending}) + + def force_complete(self): + """Function on force complete button""" + for line in self.orientation_lines: + if line.state != 'cancel': + line.state = 'complete' + self.orientation_id.write({'state': 'complete'}) diff --git a/employee_orientation/wizard/orientation_force_complete_views.xml b/employee_orientation/wizard/orientation_force_complete_views.xml new file mode 100644 index 000000000..35a1574e5 --- /dev/null +++ b/employee_orientation/wizard/orientation_force_complete_views.xml @@ -0,0 +1,25 @@ + + + + + orientation.force.complete.view.form + orientation.force.complete + +
+

+ Please make sure that orientations programs are already + done. +

+ +
+