@ -0,0 +1,23 @@ |
|||
Employee Orientation v11 |
|||
======================== |
|||
|
|||
This module developed to manage employee orientation&training programs. |
|||
|
|||
Installation |
|||
============ |
|||
Just select it from modules list to install, there is no need to extra installations. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
# The system automatically create employee orientation request when employee orientation is confirmed. |
|||
# Now when responsible person login in system, he/she will find job allocated as Orientation Checklists Requests and finish it. |
|||
|
|||
Credits |
|||
======= |
|||
Developer: Anusha @cybrosys, anusha@cybrosys.in |
|||
Developer: Niyas V11 @cybrosys, niyas@cybrosys.in |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<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 wizard |
@ -0,0 +1,46 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<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': "Employee Orientation & Training", |
|||
'version': '11.0.1.0.0', |
|||
"category": "Generic Modules/Human Resources", |
|||
'summary': """Employee Orientation/Training Program""", |
|||
'description': """Complete Employee Orientation/Training Program""", |
|||
'author': "Cybrosys Techno Solutions", |
|||
'company': "Cybrosys Techno Solutions", |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['base', 'hr'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'wizard/orientation_complete.xml', |
|||
'views/orientation_checklist_line.xml', |
|||
'views/orientation_checklist.xml', |
|||
'views/employee_orientation.xml', |
|||
'views/orientation_checklists_request.xml', |
|||
'views/orientation_checklist_sequence.xml', |
|||
'views/orientation_request_mail_template.xml', |
|||
'views/employee_training.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,7 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import orientation_checklist_line |
|||
from . import orientation_checklist |
|||
from . import employee_orientation |
|||
from . import orientation_checklist_request |
|||
from . import employee_training |
@ -0,0 +1,73 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class Orientation(models.Model): |
|||
_name = 'employee.orientation' |
|||
_description = "Employee Orientation" |
|||
_inherit = 'mail.thread' |
|||
|
|||
name = fields.Char(string='Employee Orientation', readonly=True, default=lambda self: _('New')) |
|||
employee_name = fields.Many2one('hr.employee', string='Employee', size=32, required=True) |
|||
department = fields.Many2one('hr.department', string='Department', related='employee_name.department_id', required=True) |
|||
date = fields.Date(string="Date", default=fields.Datetime.now) |
|||
responsible_user = fields.Many2one('res.users', string='Responsible User') |
|||
employee_company = fields.Many2one('res.company', string='Company', required=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
parent_id = fields.Many2one('hr.employee', string='Manager', related='employee_name.parent_id') |
|||
job_id = fields.Many2one('hr.job', string='Job Title', related='employee_name.job_id', |
|||
domain="[('department_id', '=', department)]") |
|||
orientation_id = fields.Many2one('orientation.checklist', string='Orientation Checklist', |
|||
domain="[('checklist_department','=', department)]", required=True) |
|||
note_id = fields.Text('Description') |
|||
orientation_request = fields.One2many('orientation.request', 'request_orientation', string='Orientation Request') |
|||
state = fields.Selection([ |
|||
('draft', 'Draft'), |
|||
('confirm', 'Confirmed'), |
|||
('cancel', 'Canceled'), |
|||
('complete', 'Completed'), |
|||
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') |
|||
|
|||
@api.multi |
|||
def confirm_orientation(self): |
|||
self.write({'state': 'confirm'}) |
|||
for values in self.orientation_id.checklist_line_id: |
|||
self.env['orientation.request'].create({ |
|||
'request_name': values.line_name, |
|||
'request_orientation': self.id, |
|||
'partner_id': values.responsible_user.id, |
|||
'request_date': self.date, |
|||
'employee_id': self.employee_name.id, |
|||
}) |
|||
|
|||
@api.multi |
|||
def cancel_orientation(self): |
|||
for request in self.orientation_request: |
|||
request.state = 'cancel' |
|||
self.write({'state': 'cancel'}) |
|||
|
|||
@api.multi |
|||
def complete_orientation(self): |
|||
force_complete = False |
|||
for request in self.orientation_request: |
|||
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): |
|||
if vals.get('name', 'New') == 'New': |
|||
vals['name'] = self.env['ir.sequence'].next_by_code('employee.orientation') or 'New' |
|||
result = super(Orientation, self).create(vals) |
|||
return result |
@ -0,0 +1,78 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class EmployeeTraining(models.Model): |
|||
_name = 'employee.training' |
|||
_rec_name = 'program_name' |
|||
_description = "Employee Training" |
|||
_inherit = 'mail.thread' |
|||
|
|||
program_name = fields.Char(string='Training Program', required=True) |
|||
program_department = fields.Many2one('hr.department', string='Department', required=True) |
|||
program_convener = fields.Many2one('res.users', string='Responsible User', size=32, required=True) |
|||
training_id = fields.One2many('hr.employee', string='Employee Details', compute="employee_details") |
|||
note_id = fields.Text('Description') |
|||
date_from = fields.Date(string="Date From") |
|||
date_to = fields.Date(string="Date To") |
|||
user_id = fields.Many2one('res.users', string='users', default=lambda self: self.env.user) |
|||
company_id = fields.Many2one('res.company', string='Company', required=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
state = fields.Selection([ |
|||
('new', 'New'), |
|||
('confirm', 'Confirmed'), |
|||
('cancel', 'Canceled'), |
|||
('complete', 'Completed'), |
|||
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='new') |
|||
|
|||
@api.onchange('program_department') |
|||
def employee_details(self): |
|||
data = self.env['hr.employee'].search( |
|||
[('department_id', '=', self.program_department.id)]) |
|||
self.training_id = data |
|||
|
|||
@api.multi |
|||
def complete_event(self): |
|||
self.write({'state': 'complete'}) |
|||
|
|||
@api.multi |
|||
def confirm_event(self): |
|||
self.write({'state': 'confirm'}) |
|||
|
|||
@api.multi |
|||
def cancel_event(self): |
|||
self.write({'state': 'cancel'}) |
|||
|
|||
@api.multi |
|||
def confirm_send_mail(self): |
|||
self.ensure_one() |
|||
ir_model_data = self.env['ir.model.data'] |
|||
try: |
|||
template_id = ir_model_data.get_object_reference('employee_orientation', 'orientation_training_mailer')[1] |
|||
except ValueError: |
|||
template_id = False |
|||
try: |
|||
compose_form_id = ir_model_data.get_object_reference('mail', 'email_compose_message_wizard_form')[1] |
|||
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, |
|||
} |
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import models, fields, _ |
|||
|
|||
|
|||
class OrientationChecklist(models.Model): |
|||
_name = 'orientation.checklist' |
|||
_description = "Checklist" |
|||
_rec_name = 'checklist_name' |
|||
_inherit = 'mail.thread' |
|||
|
|||
checklist_name = fields.Char(string='Name', required=True) |
|||
checklist_department = fields.Many2one('hr.department', string='Department', required=True) |
|||
active = fields.Boolean(string='Active', default=True, |
|||
help="Set active to false to hide the Orientation Checklist without removing it.") |
|||
checklist_line_id = fields.Many2many('checklist.line', 'checklist_line_rel', String="Checklist") |
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,11 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import models, fields |
|||
|
|||
|
|||
class ChecklistLine(models.Model): |
|||
_name = 'checklist.line' |
|||
_rec_name = 'line_name' |
|||
|
|||
line_name = fields.Char(string='Name', required=True) |
|||
responsible_user = fields.Many2one('res.users', string='Responsible User', required=True) |
@ -0,0 +1,71 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import models, fields, api |
|||
from odoo.tools.translate import _ |
|||
|
|||
|
|||
class OrientationChecklistRequest(models.Model): |
|||
_name = 'orientation.request' |
|||
_description = "Employee Orientation Request" |
|||
_rec_name = 'request_name' |
|||
_inherit = 'mail.thread' |
|||
|
|||
request_name = fields.Char(string='Name') |
|||
request_orientation = fields.Many2one('employee.orientation', string='Employee Orientation') |
|||
employee_company = fields.Many2one('res.company', string='Company', required=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
partner_id = fields.Many2one('res.users', string='Responsible User') |
|||
request_date = fields.Date(string="Date") |
|||
employee_id = fields.Many2one('hr.employee', string='Employee') |
|||
request_expected_date = fields.Date(string="Expected Date") |
|||
attachment_id_1 = fields.Many2many('ir.attachment', 'orientation_rel_1', string="Attachment") |
|||
note_id = fields.Text('Description') |
|||
user_id = fields.Many2one('res.users', string='users', default=lambda self: self.env.user) |
|||
company_id = fields.Many2one('res.company', string='Company', required=True, |
|||
default=lambda self: self.env.user.company_id) |
|||
state = fields.Selection([ |
|||
('new', 'New'), |
|||
('cancel', 'Cancel'), |
|||
('complete', 'Completed'), |
|||
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='new') |
|||
|
|||
@api.multi |
|||
def confirm_send_mail(self): |
|||
self.ensure_one() |
|||
ir_model_data = self.env['ir.model.data'] |
|||
try: |
|||
template_id = ir_model_data.get_object_reference('employee_orientation', 'orientation_request_mailer')[1] |
|||
except ValueError: |
|||
template_id = False |
|||
try: |
|||
compose_form_id = ir_model_data.get_object_reference('mail', 'email_compose_message_wizard_form')[1] |
|||
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, |
|||
} |
|||
|
|||
@api.multi |
|||
def confirm_request(self): |
|||
self.write({'state': "complete"}) |
|||
|
|||
@api.multi |
|||
def cancel_request(self): |
|||
self.write({'state': "cancel"}) |
|
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 8.9 KiB |
@ -0,0 +1,161 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Employee Orientation & Training</h2> |
|||
<h3 class="oe_slogan">Manage Employee Orientation And Training Programs</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>Major Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑</span> Makes the Employee Orientation Program easier.<br/> |
|||
<span style="color:green;"> ☑</span> Systematical Workflow.<br/> |
|||
<span style="color:green;"> ☑</span> Allows to Create Employee Training Programs.<br/> |
|||
<span style="color:green;"> ☑</span> Email Notification for each Responsible person.<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"> |
|||
Employee orientation/training is the process by which an employee acquires the necessary skills, |
|||
knowledge, behaviors, and contacts to effectively transition into a new organization.It can enhance |
|||
the overall satisfaction of employees and can encourage a positive attitude about the employer. |
|||
Employees view companies that offer meaningful benefits as more caring and engaged with their needs. |
|||
This may help reduce turnover and increase productivity |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_space"> |
|||
<h3 class="oe_slogan">Configuration</h3> |
|||
<div class="oe_picture"> |
|||
<p class="oe_mt32">You can configure employee orientation programs for each department from |
|||
<b>Employees -> Configuration -> Orientation Program</b></p> |
|||
</div> |
|||
<h4 class="oe_slogan">Orientation Checklist</h4> |
|||
|
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_9.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_8.png"> |
|||
</div> |
|||
</div> |
|||
<h4 class="oe_slogan">Orientation Checklist Line</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_7.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_6.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_space"> |
|||
<h3 class="oe_slogan">Employee Orientation</h3> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_2.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_1.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_picture"> |
|||
<p class="oe_mt32"> |
|||
On confirming employee orientation, creates orientation lines from corresponding orientation checklist. |
|||
</p></div> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_3.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_space"> |
|||
<h3 class="oe_slogan">Orientation Request</h3> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_5.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_4.png"> |
|||
</div> |
|||
</div> |
|||
<h4 class="oe_slogan">Email Template</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_13.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_space"> |
|||
<h2 class="oe_slogan">Employee Training </h2> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_11.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_10.png"> |
|||
</div> |
|||
</div> |
|||
<h4 class="oe_slogan">Email Template</h4> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="hr_orientation_12.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<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"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><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.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
@ -0,0 +1,112 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_employee_orientation_tree" model="ir.ui.view"> |
|||
<field name="name">employee.orientation.tree</field> |
|||
<field name="model">employee.orientation</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Employee Orientation"> |
|||
<field name="employee_name" /> |
|||
<field name="department" /> |
|||
<field name="responsible_user"/> |
|||
<field name="orientation_id"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_employee_orientation_form" model="ir.ui.view"> |
|||
<field name="name">employee.orientation.form</field> |
|||
<field name="model">employee.orientation</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Employee Orientation"> |
|||
<header> |
|||
<button name="confirm_orientation" string="Confirm" type="object" states="draft" class="btn-primary" /> |
|||
<button name="complete_orientation" string="Mark Done" type="object" states="confirm" class="btn-primary"/> |
|||
<button name="cancel_orientation" string="Cancel" type="object" states="draft,confirm"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,complete"/> |
|||
</header> |
|||
<sheet> |
|||
<div class="oe_title"> |
|||
<h1> |
|||
<field name="name" readonly="1"/> |
|||
</h1> |
|||
</div> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="employee_name" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="department" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="date" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="job_id" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="responsible_user" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="parent_id" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="employee_company" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
<field name="orientation_id" attrs="{'readonly':[('state','in',('confirm','complete'))]}"/> |
|||
</group> |
|||
<notebook colspan="4"> |
|||
<page name="checklist_lines" string="Orientation Checklists Lines" attrs="{'invisible': [('state', '=', 'draft')]}"> |
|||
<field name="orientation_request" attrs="{'readonly':[('state','=','complete')]}"> |
|||
<tree string="lines" editable="bottom"> |
|||
<field name="request_name"/> |
|||
<field name="partner_id"/> |
|||
<field name="request_expected_date"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
<form> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="request_name" /> |
|||
<field name="request_orientation"/> |
|||
<field name="employee_company" readonly="1"/> |
|||
<field name="partner_id"/> |
|||
<field name="request_date" readonly="1"/> |
|||
<field name="request_expected_date"/> |
|||
<field name="employee_id" invisible="1"/> |
|||
</group> |
|||
</form> |
|||
</field> |
|||
</page> |
|||
<page name="note_book" |
|||
string="Notes"> |
|||
<field name="note_id" colspan="4" nolabel="1" /> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="view_employee_orientation_search" model="ir.ui.view"> |
|||
<field name="name">employee.orientation.search</field> |
|||
<field name="model">employee.orientation</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Employee Orientation"> |
|||
<field name="employee_name"/> |
|||
<field name="department"/> |
|||
<newline /> |
|||
<group expand="0" string="Group By..."> |
|||
<filter string="department" domain="[]" |
|||
context="{'group_by':'department'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_employee_orientation"> |
|||
<field name="name">Employee Orientation</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">employee.orientation</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="view_employee_orientation_search" /> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create Employee Orientation. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<menuitem action="action_employee_orientation" id="menu_employee_orientation_child" name="Employee Orientation" parent="menu_employee_orientation" sequence="1" groups="hr.group_hr_manager,hr.group_hr_user"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,91 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_employee_training_tree" model="ir.ui.view"> |
|||
<field name="name">employee.training.tree</field> |
|||
<field name="model">employee.training</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Employee Training Program"> |
|||
<field name="program_name"/> |
|||
<field name="program_department"/> |
|||
<field name="program_convener" domain="[('department_id.name', '=', 'program_department.name')]"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_employee_training_form" model="ir.ui.view"> |
|||
<field name="name">employee.training.form</field> |
|||
<field name="model">employee.training</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Employee Training Program"> |
|||
<header> |
|||
<button name="confirm_send_mail" string="Send by Email" type="object" class="oe_highlight" states="confirm"/> |
|||
<button name="confirm_event" string="Confirm Event" type="object" states="new" class="btn-primary" /> |
|||
<button name="complete_event" string="Event Complete" type="object" states="confirm" class="btn-primary"/> |
|||
<button name="cancel_event" string="Cancel Event" type="object" states="confirm"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="new,confirm,complete"/> |
|||
</header> |
|||
<sheet> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="program_name" /> |
|||
<field name="program_department"/> |
|||
<label for="date_from" string="Time Period"/> |
|||
<div><field name="date_from" class="oe_inline"/> to <field name="date_to" class="oe_inline"/></div> |
|||
<field name="program_convener"/> |
|||
</group> |
|||
<notebook colspan="4"> |
|||
<page name="checklist_lines" string="Employee Details"> |
|||
<field name="training_id"/> |
|||
</page> |
|||
<page name="note_book" |
|||
string="Notes"> |
|||
<field name="note_id" colspan="4" nolabel="1" /> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="view_employee_training_search" model="ir.ui.view"> |
|||
<field name="name">employee.training.search</field> |
|||
<field name="model">employee.training</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Employee Training Program"> |
|||
<field name="program_name"/> |
|||
<newline /> |
|||
<group expand="0" string="Group By..."> |
|||
<filter string="name" domain="[]" |
|||
context="{'group_by':'program_name'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_employee_training"> |
|||
<field name="name">Employee Training Program</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">employee.training</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="view_employee_training_search" /> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create Employee Training Program. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="menu_employee_training_child" |
|||
name="Training Program" |
|||
parent="hr.menu_hr_root" |
|||
action="action_employee_training" |
|||
sequence="91" |
|||
/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,87 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_orientation_checklist_tree" model="ir.ui.view"> |
|||
<field name="name">orientation.checklist.tree</field> |
|||
<field name="model">orientation.checklist</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Orientation Checklists"> |
|||
<field name="checklist_name" /> |
|||
<field name="checklist_department" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_orientation_checklist_form" model="ir.ui.view"> |
|||
<field name="name">orientation.checklist.form</field> |
|||
<field name="model">orientation.checklist</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<form string="Orientation Checklists"> |
|||
<sheet> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="checklist_name" /> |
|||
<field name="checklist_department"/> |
|||
<field name="active"/> |
|||
</group> |
|||
<notebook colspan="4"> |
|||
<page name="checklist_line" string="Checklist Lines"> |
|||
<field name="checklist_line_id" string="Checklist Line"> |
|||
<tree string="Checklist Lines" editable="bottom"> |
|||
<field name="line_name"/> |
|||
<field name="responsible_user"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_orientation_checklist_search" model="ir.ui.view"> |
|||
<field name="name">orientation.checklist.search</field> |
|||
<field name="model">orientation.checklist</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<search string="Orientation Checklists"> |
|||
<field name="checklist_name"/> |
|||
<field name="checklist_department"/> |
|||
<newline /> |
|||
<group expand="0" string="Group By"> |
|||
<filter string="department" domain="[]" |
|||
context="{'group_by':'checklist_department'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_orientation_checklist"> |
|||
<field name="name">Orientation Checklist</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">orientation.checklist</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="view_orientation_checklist_search" /> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{'search_default_active': True}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create Orientation Checklists. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem action="action_orientation_checklist" |
|||
id="menu_orientation_checklist_config" |
|||
name="Orientation Checklist" |
|||
parent="menu_employee_orientation_config" |
|||
sequence="10" |
|||
groups="hr.group_hr_manager" |
|||
/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,85 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_checklist_line_tree" model="ir.ui.view"> |
|||
<field name="name">checklist.line.tree</field> |
|||
<field name="model">checklist.line</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Orientation Checklists Lines"> |
|||
<field name="line_name" /> |
|||
<field name="responsible_user" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_checklist_line_form" model="ir.ui.view"> |
|||
<field name="name">checklist.line.form</field> |
|||
<field name="model">checklist.line</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<form string="Orientation Checklists Lines"> |
|||
<sheet> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="line_name" /> |
|||
<field name="responsible_user"/> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="checklist_line_search" model="ir.ui.view"> |
|||
<field name="name">checklist.line.search</field> |
|||
<field name="model">checklist.line</field> |
|||
<field name="priority" eval="8" /> |
|||
<field name="arch" type="xml"> |
|||
<search string="Orientation Checklists Lines"> |
|||
<field name="line_name" /> |
|||
<field name="responsible_user" /> |
|||
<newline /> |
|||
<group expand="0" string="Group By..."> |
|||
<filter string="ResponsibleUser" domain="[]" |
|||
context="{'group_by':'responsible_user'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_checklist_line"> |
|||
<field name="name">Orientation Checklist Line</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">checklist.line</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="checklist_line_search" /> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create Orientation Checklists Lines. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="menu_employee_orientation" |
|||
name="Orientations" |
|||
parent="hr.menu_hr_root" |
|||
sequence="90" |
|||
/> |
|||
|
|||
<!-- Configuration Menu --> |
|||
<menuitem id="menu_employee_orientation_config" |
|||
name="Orientation Program" |
|||
parent="hr.menu_human_resources_configuration" |
|||
sequence="10" |
|||
groups="hr.group_hr_manager" |
|||
/> |
|||
|
|||
<menuitem action="action_checklist_line" |
|||
id="menu_employee_orientation_config_line" |
|||
name="Orientation Checklist Line" |
|||
parent="menu_employee_orientation_config" |
|||
sequence="20" |
|||
groups="hr.group_hr_manager" |
|||
/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
|
|||
<!-- Sequences for employee.orientation --> |
|||
<record id="seq_orientation_checklist" model="ir.sequence"> |
|||
<field name="name">Employee Orientation</field> |
|||
<field name="code">employee.orientation</field> |
|||
<field name="prefix">OR</field> |
|||
<field name="padding">3</field> |
|||
<field eval="1" name="1"/> |
|||
<field name="company_id" eval="False"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,84 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="view_orientation_request_tree" model="ir.ui.view"> |
|||
<field name="name">orientation.request.tree</field> |
|||
<field name="model">orientation.request</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Employee Orientation" create="0"> |
|||
<field name="request_name" /> |
|||
<field name="request_orientation" /> |
|||
<field name="partner_id" /> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_orientation_request_form" model="ir.ui.view"> |
|||
<field name="name">orientation.request.form</field> |
|||
<field name="model">orientation.request</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Employee Orientation" create="0"> |
|||
<header> |
|||
<button name="confirm_send_mail" string="Send by Email" type="object" class="oe_highlight"/> |
|||
<button name="confirm_request" string="Complete" type="object" states="new" class="btn-primary"/> |
|||
<button name="cancel_request" string="Cancel" type="object" states="new"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="new,complete"/> |
|||
</header> |
|||
<sheet> |
|||
<group colspan="1" col="4" name="main"> |
|||
<field name="request_name" readonly="1"/> |
|||
<field name="request_orientation" readonly="1"/> |
|||
<field name="employee_id" readonly="1"/> |
|||
<field name="partner_id" readonly="1"/> |
|||
<field name="request_date" readonly="1"/> |
|||
<field name="request_expected_date" attrs="{'readonly':[('state','=','complete')]}"/> |
|||
<field name="employee_company" readonly="1"/> |
|||
</group> |
|||
<notebook> |
|||
<page name="orientation_line_attachments" string="Documents"> |
|||
<field name="attachment_id_1" widget="many2many_binary" attrs="{'readonly':[('state','=','complete')]}" /> |
|||
</page> |
|||
<page name="note_book" string="Notes"> |
|||
<field name="note_id" nolabel="1"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="view_orientation_request_search" model="ir.ui.view"> |
|||
<field name="name">orientation.request.search</field> |
|||
<field name="model">orientation.request</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Employee Orientation"> |
|||
<field name="request_name"/> |
|||
<newline /> |
|||
<group expand="0" string="Group By..."> |
|||
<filter string="Request" domain="[]" |
|||
context="{'group_by':'request_name'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_orientation_request"> |
|||
<field name="name">Orientation Request</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">orientation.request</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="search_view_id" ref="view_orientation_request_search" /> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create Orientation Requests. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<menuitem action="action_orientation_request" id="menu_orientation_request" name="Orientation Request" parent="menu_employee_orientation" sequence="2"/> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,90 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data noupdate="1"> |
|||
<record id="orientation_request_mailer" model="mail.template"> |
|||
<field name="name">Employee Orientation Request</field> |
|||
<field name="email_from">${(object.user_id.email or object.company_id.email)|safe}</field> |
|||
<field name="email_to">${(object.partner_id.email)}</field> |
|||
<field name="subject">Employee Orientation Request</field> |
|||
<field name="model_id" ref="employee_orientation.model_orientation_request" /> |
|||
<field name="auto_delete" eval="True" /> |
|||
<field name="body_html"><![CDATA[ |
|||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
|||
<p>Hello ${object.partner_id.name},</p> |
|||
<p>Your are request to conduct orientation program listed below.</p> |
|||
<p>Check Line: ${object.request_name}</p> |
|||
<p>Employee: ${object.employee_id.name}</p> |
|||
%if object.request_expected_date: |
|||
<p>Expected Date: ${object.request_expected_date}</p> |
|||
% endif |
|||
<br/> |
|||
<p>Thank you!</p> |
|||
<br/> |
|||
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;"> |
|||
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;"> |
|||
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3> |
|||
</div> |
|||
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;"> |
|||
<span style="color: #222; margin-bottom: 5px; display: block; "> |
|||
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} |
|||
</span> |
|||
% if object.company_id.phone: |
|||
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> |
|||
Phone: ${object.company_id.phone} |
|||
</div> |
|||
% endif |
|||
% if object.company_id.website: |
|||
<div> |
|||
Web : <a href="${object.company_id.website}">${object.company_id.website}</a> |
|||
</div> |
|||
%endif |
|||
<p></p> |
|||
</div> |
|||
</div> |
|||
]]> |
|||
</field> |
|||
</record> |
|||
<record id="orientation_training_mailer" model="mail.template"> |
|||
<field name="name">Employee Training program</field> |
|||
<field name="email_from">${(object.user_id.email or object.company_id.email)}</field> |
|||
<field name="email_to">${(object.program_convener.email)|safe}</field> |
|||
<field name="subject">Employee Training Request</field> |
|||
<field name="model_id" ref="employee_orientation.model_employee_training" /> |
|||
<field name="auto_delete" eval="True" /> |
|||
<field name="body_html"><![CDATA[ |
|||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
|||
<p>Hello ${object.program_convener.name},</p> |
|||
<p>Your are request to conduct ${object.program_name} Training program for ${object.program_department.name} department |
|||
% if object.from_date and object.to_date: |
|||
from ${object.from_date} to ${object.to_date} |
|||
% endif |
|||
.</p> |
|||
<br/> |
|||
<p>Thank you!</p> |
|||
<br/> |
|||
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;"> |
|||
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;"> |
|||
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3> |
|||
</div> |
|||
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;"> |
|||
<span style="color: #222; margin-bottom: 5px; display: block; "> |
|||
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} |
|||
</span> |
|||
% if object.company_id.phone: |
|||
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> |
|||
Phone: ${object.company_id.phone} |
|||
</div> |
|||
% endif |
|||
% if object.company_id.website: |
|||
<div> |
|||
Web : <a href="${object.company_id.website}">${object.company_id.website}</a> |
|||
</div> |
|||
%endif |
|||
<p></p> |
|||
</div> |
|||
</div> |
|||
]]> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import orientation_complete |
@ -0,0 +1,27 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class OrientationForceComplete(models.TransientModel): |
|||
_name = 'orientation.force.complete' |
|||
|
|||
name = fields.Char() |
|||
orientation_id = fields.Many2one('employee.orientation', string='Orientation') |
|||
orientation_lines = fields.One2many('orientation.request', string='Orientation Lines', compute='pending_lines') |
|||
|
|||
@api.onchange('orientation_id') |
|||
def pending_lines(self): |
|||
pending = [] |
|||
for data in self.orientation_id.orientation_request: |
|||
if data.state == 'new': |
|||
pending.append(data.id) |
|||
self.update({'orientation_lines': pending}) |
|||
|
|||
@api.multi |
|||
def force_complete(self): |
|||
for line in self.orientation_lines: |
|||
if line.state != 'cancel': |
|||
line.state = 'complete' |
|||
self.orientation_id.write({'state': 'complete'}) |
|||
|
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="view_orientation_force_complete_form" model="ir.ui.view"> |
|||
<field name="name">orientation.force.complete.form</field> |
|||
<field name="model">orientation.force.complete</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Complete Orientation"> |
|||
<p class="oe_gray"> |
|||
Please make sure that orientations programs are already done. |
|||
</p> |
|||
<field name="orientation_id" invisible="1"/> |
|||
<label for="orientation_lines" string="Pending Lines"/> |
|||
<field name="orientation_lines" readonly="1"/> |
|||
<footer> |
|||
<button name="force_complete" string="Force Complete" type="object" class="btn-primary"/> |
|||
<button string="Cancel" class="btn-default" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |