Browse Source

[UDT] Security Added

pull/81/head
Sreejith P 7 years ago
parent
commit
a56fc67ffb
  1. 10
      employee_orientation/README.rst
  2. 25
      employee_orientation/__init__.py
  3. 35
      employee_orientation/__openerp__.py
  4. 25
      employee_orientation/doc/changelog.rst
  5. 24
      employee_orientation/models/__init__.py
  6. 80
      employee_orientation/models/employee_orientation.py
  7. 36
      employee_orientation/models/employee_training.py
  8. 34
      employee_orientation/models/orientation_checklist.py
  9. 24
      employee_orientation/models/orientation_checklist_line.py
  10. 35
      employee_orientation/models/orientation_checklist_request.py
  11. 13
      employee_orientation/security/ir.model.access.csv
  12. BIN
      employee_orientation/static/description/checklist_form.png
  13. BIN
      employee_orientation/static/description/checklist_tree.png
  14. BIN
      employee_orientation/static/description/employee_form.png
  15. BIN
      employee_orientation/static/description/employee_tree.png
  16. BIN
      employee_orientation/static/description/hr_orientation_1.png
  17. BIN
      employee_orientation/static/description/hr_orientation_10.png
  18. BIN
      employee_orientation/static/description/hr_orientation_11.png
  19. BIN
      employee_orientation/static/description/hr_orientation_12.png
  20. BIN
      employee_orientation/static/description/hr_orientation_13.png
  21. BIN
      employee_orientation/static/description/hr_orientation_2.png
  22. BIN
      employee_orientation/static/description/hr_orientation_3.png
  23. BIN
      employee_orientation/static/description/hr_orientation_4.png
  24. BIN
      employee_orientation/static/description/hr_orientation_5.png
  25. BIN
      employee_orientation/static/description/hr_orientation_6.png
  26. BIN
      employee_orientation/static/description/hr_orientation_7.png
  27. BIN
      employee_orientation/static/description/hr_orientation_8.png
  28. BIN
      employee_orientation/static/description/hr_orientation_9.png
  29. 128
      employee_orientation/static/description/index.html
  30. BIN
      employee_orientation/static/description/line_form.png
  31. BIN
      employee_orientation/static/description/line_tree.png
  32. BIN
      employee_orientation/static/description/request_form.png
  33. BIN
      employee_orientation/static/description/request_mail.png
  34. BIN
      employee_orientation/static/description/request_tree.png
  35. BIN
      employee_orientation/static/description/training_form.png
  36. BIN
      employee_orientation/static/description/training_mail.png
  37. BIN
      employee_orientation/static/description/training_tree.png
  38. 48
      employee_orientation/views/employee_orientation.xml
  39. 15
      employee_orientation/views/employee_training.xml
  40. 55
      employee_orientation/views/orientation_checklist.xml
  41. 32
      employee_orientation/views/orientation_checklist_line.xml
  42. 36
      employee_orientation/views/orientation_checklists_request.xml
  43. 28
      employee_orientation/views/orientation_request_mail_template.xml
  44. 3
      employee_orientation/wizard/__init__.py
  45. 26
      employee_orientation/wizard/orientation_complete.py
  46. 23
      employee_orientation/wizard/orientation_complete.xml

10
employee_orientation/README.rst

@ -1,7 +1,7 @@
Employee Orientation v9
=======================
This module developed to manage employee orientation/training programs.
This module developed to manage employee orientation&training programs.
Installation
============
@ -9,13 +9,13 @@ Just select it from modules list to install, there is no need to extra installat
Usage
=====
#.In Employee orientation form, when a Orientation Checklist selects the corresponding departments checklist lines fill automatically.
#.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.
# 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
Developer: Anusha @ cybrosys, anusha@cybrosys.in
Guidance: Nilmar Shereef @ cybrosys, shereef@cybrosys.in

25
employee_orientation/__init__.py

@ -1,23 +1,20 @@
# -*- coding: utf-8 -*-
##############################################################################
#
###################################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
# 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

35
employee_orientation/__openerp__.py

@ -1,36 +1,33 @@
# -*- coding: utf-8 -*-
##############################################################################
#
###################################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
# 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': '9.0.1.0.0',
'version': '9.0.2.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': "http://www.cybrosys.com",
'depends': ['base', 'hr', 'mail', ],
'website': "https://www.cybrosys.com",
'depends': ['base', 'hr'],
'data': [
'wizard/orientation_complete.xml',
'views/orientation_checklist_line.xml',
'views/orientation_checklist.xml',
'views/employee_orientation.xml',
@ -41,8 +38,8 @@
'security/ir.model.access.csv',
],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
'application': False,
}

25
employee_orientation/doc/changelog.rst

@ -0,0 +1,25 @@
Changelog
=========
* Nilmar Shereef contact: shereef@cybrosys.in
`9.0.2.0.0`
-----------
- Changed Menus: Removed extra main menu Orientation & Moved the Orientation and Employee Training menus under Employee menu.
- Removed the model 'orientation.check'.
- Changes in function 'confirm_request' in Employee Orientation Request.
- Changes in function 'complete_event' in Employee Training.
- Extra state : Cancel state for Orientation.
- Extra function 'cancel_orientation' in Orientation.
- Field Modifications : Domain for fields in Orientation.
- Removed the field 'orientation_line_id' from Orientation.
- Extra field 'orientation_request' in Orientation.
- Removed function 'get_value' and added related for field.
- Extra wizard for orientation force completion added.
- Extra state : Cancel state for Employee Orientation Request.
- Extra function 'cancel_orientation' in Employee Orientation Request.
- Change model and type for the field checklist_line_id Orientation Checklist.
- Extra fields 'date_from' and 'date_to' in Employee Training.
- Some changes in mail templates.
- Security changed.
- Dependency Added.

24
employee_orientation/models/__init__.py

@ -1,25 +1,21 @@
# -*- coding: utf-8 -*-
##############################################################################
#
###################################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
# 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 orientation_checklist_line
from . import orientation_checklist
from . import employee_orientation

80
employee_orientation/models/employee_orientation.py

@ -1,25 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import api, fields, models, _
@ -30,40 +9,59 @@ class Orientation(models.Model):
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', 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')
job_id = fields.Many2one('hr.job', string='Job Title')
orientation_id = fields.Many2one('orientation.checklist', string='Orientation Checklist', required=True)
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_line_id = fields.Many2many('orientation.check', string='Orientation Line')
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'})
data = self.env['orientation.check'].search([('relative_field.employee_name.name', '=', self.employee_name.name)])
for values in self.orientation_line_id:
for values in self.orientation_id.checklist_line_id:
self.env['orientation.request'].create({
'request_name': values.checklist_line_name.line_name,
'request_name': values.line_name,
'request_orientation': self.id,
'partner_id': values.checklist_line_user.id,
'partner_id': values.responsible_user.id,
'request_date': self.date,
'request_expected_date': values.expected_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
@ -72,19 +70,3 @@ class Orientation(models.Model):
vals['name'] = self.env['ir.sequence'].next_by_code('employee.orientation') or 'New'
result = super(Orientation, self).create(vals)
return result
@api.onchange('orientation_id')
def orientation_details(self):
data = self.env['orientation.check'].search([('checklist.checklist_name', '=', self.orientation_id.checklist_name),
('checklist.checklist_department.name', '=', self.department.name)])
self.orientation_line_id = [(6, 0, [x.id for x in data])]
@api.onchange('employee_name')
def get_value(self):
self.department = self.employee_name.department_id
self.parent_id = self.employee_name.parent_id
self.job_id = self.employee_name.job_id

36
employee_orientation/models/employee_training.py

@ -1,29 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import api, fields, models, _
class Orientation(models.Model):
class EmployeeTraining(models.Model):
_name = 'employee.training'
_rec_name = 'program_name'
_description = "Employee Training"
@ -34,12 +13,15 @@ class Orientation(models.Model):
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)
user_id = fields.Many2one('res.users', string='users', default=lambda self: self.env.user)
state = fields.Selection([
('new', 'New'),
('confirm', 'Confirmed'),
('cancel', 'Canceled'),
('complete', 'Completed'),
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='new')
@ -51,14 +33,16 @@ class Orientation(models.Model):
@api.multi
def complete_event(self):
user_obj = self.env.user
if user_obj == self.program_convener.user_id:
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()
@ -91,5 +75,3 @@ class Orientation(models.Model):
'target': 'new',
'context': ctx,
}

34
employee_orientation/models/orientation_checklist.py

@ -1,25 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields, _
@ -33,20 +12,9 @@ class OrientationChecklist(models.Model):
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.One2many('orientation.check', 'checklist', String="Checklist")
checklist_line_id = fields.Many2many('checklist.line', 'checklist_line_rel', String="Checklist")
class OrientationChecklistNew(models.Model):
_name = 'orientation.check'
checklist_line_name = fields.Many2one('checklist.line', string='Name')
checklist_line_user = fields.Many2one('res.users', string='Responsible User',
related='checklist_line_name.responsible_user')
expected_date = fields.Date(string="Expected Date", default=fields.Datetime.now)
status = fields.Char(string='Status', readonly=True, default=lambda self: _('New'))
checklist = fields.Many2one('orientation.checklist', string="Checklist", ondelete='cascade')
relative_field = fields.Many2one('employee.orientation')

24
employee_orientation/models/orientation_checklist_line.py

@ -1,25 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields
@ -29,6 +8,3 @@ class ChecklistLine(models.Model):
line_name = fields.Char(string='Name', required=True)
responsible_user = fields.Many2one('res.users', string='Responsible User', required=True)

35
employee_orientation/models/orientation_checklist_request.py

@ -1,26 +1,5 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields, api, _
from openerp import models, fields, api
from openerp.tools.translate import _
@ -34,18 +13,18 @@ class OrientationChecklistRequest(models.Model):
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)
user_id = fields.Many2one('res.users', string='Users', default=lambda self: self.env.user)
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')
@ -84,10 +63,8 @@ class OrientationChecklistRequest(models.Model):
@api.multi
def confirm_request(self):
user_obj = self.env.user
if user_obj == self.partner_id.user_id:
self.write({'state': "complete"})
data = self.env['orientation.check'].search([('checklist_line_name.line_name', '=', self.request_name),
('checklist_line_user.name', '=', self.partner_id.name)])
data.status = self.state
@api.multi
def cancel_request(self):
self.write({'state': "cancel"})

13
employee_orientation/security/ir.model.access.csv

@ -1,9 +1,12 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_orientation_request,orientation.request,model_orientation_request,base.group_user,1,1,1,1
access_orientation.check,orientation.check,model_orientation_check,base.group_user,1,1,1,1
access_checklist_line,checklist.line,model_checklist_line,base.group_user,1,0,0,0
access_employee_orientation,employee.orientation,model_employee_orientation,base.group_user,0,1,1,1
access_employee_training,employee.training,model_employee_training,base.group_user,1,1,1,1
access_user_orientation_request,orientation.request,model_orientation_request,base.group_hr_user,1,1,1,1
access_manager_orientation_request,orientation.request,model_orientation_request,base.group_user,1,1,0,0
access_user_checklist_line,checklist.line,model_checklist_line,base.group_hr_user,1,0,0,0
access_manager_checklist_line,checklist.line,model_checklist_line,base.group_hr_manager,1,1,1,1
access_user_employee_orientation,employee.orientation,model_employee_orientation,base.group_hr_user,1,1,1,1
access_manager_employee_orientation_request,orientation.checklist,model_orientation_checklist,base.group_hr_user,1,1,1,1
access_user_employee_training,employee.training,model_employee_training,base.group_hr_user,1,1,1,1
access_manager_employee_training,employee.training,model_employee_training,base.group_user,1,1,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_orientation_request access_user_orientation_request orientation.request model_orientation_request base.group_user base.group_hr_user 1 1 1 1
3 access_orientation.check access_manager_orientation_request orientation.check orientation.request model_orientation_check model_orientation_request base.group_user 1 1 1 0 1 0
4 access_checklist_line access_user_checklist_line checklist.line model_checklist_line base.group_user base.group_hr_user 1 0 0 0
5 access_employee_orientation access_manager_checklist_line employee.orientation checklist.line model_employee_orientation model_checklist_line base.group_user base.group_hr_manager 0 1 1 1 1
6 access_employee_training access_user_employee_orientation employee.training employee.orientation model_employee_training model_employee_orientation base.group_user base.group_hr_user 1 1 1 1
7 access_manager_employee_orientation_request orientation.checklist model_orientation_checklist base.group_hr_user 1 1 1 1
8 access_user_employee_training employee.training model_employee_training base.group_hr_user 1 1 1 1
9 access_manager_employee_training employee.training model_employee_training base.group_user 1 1 0 0
10
11
12

BIN
employee_orientation/static/description/checklist_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

BIN
employee_orientation/static/description/checklist_tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_orientation/static/description/employee_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

BIN
employee_orientation/static/description/employee_tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_orientation/static/description/hr_orientation_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
employee_orientation/static/description/hr_orientation_10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
employee_orientation/static/description/hr_orientation_11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
employee_orientation/static/description/hr_orientation_12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
employee_orientation/static/description/hr_orientation_13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
employee_orientation/static/description/hr_orientation_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
employee_orientation/static/description/hr_orientation_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
employee_orientation/static/description/hr_orientation_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
employee_orientation/static/description/hr_orientation_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
employee_orientation/static/description/hr_orientation_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
employee_orientation/static/description/hr_orientation_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
employee_orientation/static/description/hr_orientation_8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
employee_orientation/static/description/hr_orientation_9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

128
employee_orientation/static/description/index.html

@ -1,55 +1,63 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Employee Orientation/Training Program</h2>
<h4 class="oe_slogan">Cybrosys Technologies , www.cybrosys.com</h4>
<br>
<h4>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.</h4>
<br>
<h4>Benefits of Employee Orientation</h4>
<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>
<ul>
<li>&nbsp;&nbsp;It can enhance the overall satisfaction of employees and can encourage a positive attitude about the employer.</li>
<li>&nbsp;&nbsp;Employees view companies that offer meaningful benefits as more caring and engaged with their needs.
This may help reduce turnover and increase productivity</li>
</ul>
</div>
<h4>Major Features</h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Makes the Employee Orientation Program easier.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Systematical Workflow.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Allows to Create Employee Training Programs.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Email Notification for each Responsible person.</li>
</ul>
<span style="color:green;"> &#9745;</span> Makes the Employee Orientation Program easier.<br/>
<span style="color:green;"> &#9745;</span> Systematical Workflow.<br/>
<span style="color:green;"> &#9745;</span> Allows to Create Employee Training Programs.<br/>
<span style="color:green;"> &#9745;</span> Email Notification for each Responsible person.<br/>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_space">
<h2 class="oe_slogan">Employee Orientation</h2>
<p></p>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="employee_form.png">
</div>
<div class="oe_demo oe_picture oe_screenshot">
<img src="employee_tree.png">
</div>
<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">
<h2 class="oe_slogan">Orientation Request</h2>
<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="request_form.png">
<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="request_mail.png">
<img src="hr_orientation_7.png">
</div>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="request_tree.png">
<img src="hr_orientation_6.png">
</div>
</div>
</div>
@ -57,16 +65,24 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_space">
<h2 class="oe_slogan">Employee Training </h2>
<h3 class="oe_slogan">Employee Orientation</h3>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="training_form.png">
<img src="hr_orientation_2.png">
</div>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="training_mail.png">
<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="training_tree.png">
<img src="hr_orientation_3.png">
</div>
</div>
</div>
@ -74,13 +90,21 @@
<section class="oe_container">
<div class="oe_row oe_space">
<h2 class="oe_slogan">Orientation Checklist</h2>
<h3 class="oe_slogan">Orientation Request</h3>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="checklist_form.png">
<img src="hr_orientation_5.png">
</div>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="checklist_tree.png">
<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>
@ -88,30 +112,38 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_space">
<h2 class="oe_slogan">Orientation Checklist Line</h2>
<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="line_form.png">
<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="line_tree.png">
<img src="hr_orientation_12.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<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="http://www.cybrosys.com"><i
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="http://www.cybrosys.com/contact/"><i
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="http://www.cybrosys.com/odoo-customization-and-installation/"><i
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>

BIN
employee_orientation/static/description/line_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

BIN
employee_orientation/static/description/line_tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_orientation/static/description/request_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

BIN
employee_orientation/static/description/request_mail.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
employee_orientation/static/description/request_tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

BIN
employee_orientation/static/description/training_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

BIN
employee_orientation/static/description/training_mail.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
employee_orientation/static/description/training_tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

48
employee_orientation/views/employee_orientation.xml

@ -8,9 +8,13 @@
<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>
@ -19,7 +23,7 @@
<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"/>
<!--attrs="{'visible': [('state', '==', 'confirm')]}"/>-->
<button name="cancel_orientation" string="Cancel" type="object" states="draft,confirm"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,complete"/>
</header>
<sheet>
@ -29,26 +33,36 @@
</h1>
</div>
<group colspan="1" col="4" name="main">
<field name="employee_name" />
<field name="department"/>
<field name="date"/>
<field name="job_id"/>
<field name="responsible_user"/>
<field name="parent_id"/>
<field name="employee_company"/>
<field name="orientation_id" domain="[('checklist_department', '=', department)]"/>
<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">
<field name="orientation_line_id">
<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="checklist_line_name"/>
<field name="checklist_line_user"/>
<field name="expected_date"/>
<field name="status"/>
<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">
@ -93,6 +107,6 @@
</p>
</field>
</record>
<menuitem action="action_employee_orientation" id="menu_employee_orientation_child" name="Employee Orientation" parent="menu_employee_orientation" sequence="1" />
<menuitem action="action_employee_orientation" id="menu_employee_orientation_child" name="Employee Orientation" parent="menu_employee_orientation" sequence="1" groups="base.group_hr_manager,base.group_hr_user"/>
</data>
</openerp>

15
employee_orientation/views/employee_training.xml

@ -22,18 +22,20 @@
<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">
</field>
<field name="training_id"/>
</page>
<page name="note_book"
string="Notes">
@ -77,6 +79,13 @@
</p>
</field>
</record>
<menuitem action="action_employee_training" id="menu_employee_training_child" name="Employee Training Program" parent="menu_employee_training" sequence="1" />
<menuitem
id="menu_employee_training_child"
name="Training Program"
parent="hr.menu_hr_root"
action="action_employee_training"
sequence="91"
/>
</data>
</openerp>

55
employee_orientation/views/orientation_checklist.xml

@ -12,6 +12,7 @@
</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>
@ -25,12 +26,11 @@
<field name="active"/>
</group>
<notebook colspan="4">
<page name="checklist_line"
string="Checklist Lines">
<field name="checklist_line_id">
<tree string="lines" editable="bottom">
<field name="checklist_line_name"/>
<field name="checklist_line_user"/>
<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>
@ -43,6 +43,7 @@
</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>
@ -52,7 +53,7 @@
<field name="checklist_name"/>
<field name="checklist_department"/>
<newline />
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="department" domain="[]"
context="{'group_by':'checklist_department'}" />
</group>
@ -74,37 +75,13 @@
</p>
</field>
</record>
<menuitem id="menu_employee_orientation_config" name="Configuration" parent="menu_employee_orientation_root" />
<menuitem action="action_orientation_checklist" id="menu_orientation_checklist_config" name="Orientation Checklist" parent="menu_employee_orientation_config" sequence="10"/>
<record id="view_orientation_check_tree" model="ir.ui.view">
<field name="name">orientation.check.tree</field>
<field name="model">orientation.check</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Orientation Checklists">
<field name="checklist_line_name" />
<field name="checklist_line_user" />
<field name="expected_date"/>
<field name="status"/>
</tree>
</field>
</record>
<record id="view_orientation_check_form" model="ir.ui.view">
<field name="name">orientation.check.form</field>
<field name="model">orientation.check</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form>
<sheet>
<group colspan="1" col="4" name="main">
<field name="checklist_line_name" />
<field name="checklist_line_user"/>
<field name="expected_date"/>
<field name="status"/>
</group>
</sheet>
</form>
</field>
</record>
<menuitem action="action_orientation_checklist"
id="menu_orientation_checklist_config"
name="Orientation Checklist"
parent="menu_employee_orientation_config"
sequence="10"
groups="base.group_hr_manager"
/>
</data>
</openerp>

32
employee_orientation/views/orientation_checklist_line.xml

@ -24,10 +24,6 @@
<field name="responsible_user"/>
</group>
</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>
@ -62,11 +58,29 @@
</p>
</field>
</record>
<menuitem id="menu_employee_orientation_root" name="Orientation"/>
<menuitem id="menu_employee_orientation" parent="menu_employee_orientation_root" name="Orientations"/>
<menuitem id="menu_employee_training" parent="menu_employee_orientation_root" name="Employee Training Program" sequence="10"/>
<menuitem
id="menu_employee_orientation"
name="Orientations"
parent="hr.menu_hr_root"
sequence="90"
/>
<!-- Configuration Menu -->
<menuitem id="menu_employee_orientation_config" name="Configuration" parent="menu_employee_orientation_root" sequence="15" />
<menuitem action="action_checklist_line" id="menu_employee_orientation_config_line" name="Orientation Checklist Line" parent="menu_employee_orientation_config" sequence="20"/>
<menuitem id="menu_employee_orientation_config"
name="Orientation Program"
parent="hr.menu_human_resources_configuration"
sequence="10"
groups="base.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="base.group_hr_manager"
/>
</data>
</openerp>

36
employee_orientation/views/orientation_checklists_request.xml

@ -5,11 +5,11 @@
<field name="name">orientation.request.tree</field>
<field name="model">orientation.request</field>
<field name="arch" type="xml">
<tree string="Employee Orientation">
<tree string="Employee Orientation" create="0">
<field name="request_name" />
<field name="request_orientation" />
<field name="partner_id" />
<field name="state"/>
</tree>
</field>
</record>
@ -17,31 +17,29 @@
<field name="name">orientation.request.form</field>
<field name="model">orientation.request</field>
<field name="arch" type="xml">
<form string="Employee Orientation">
<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" groups="base.group_user"/>
<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" />
<field name="request_orientation"/>
<field name="employee_company"/>
<field name="partner_id"/>
<field name="request_date"/>
<field name="request_expected_date"/>
<field name="employee_id" invisible="1"/>
</group>
<notebook colspan="4">
<page name="checklist_lines" string="Orientation Checklists Lines">
<group>
<field name="attachment_id_1" widget="many2many_binary" />
<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" colspan="4" nolabel="1" />
<page name="note_book" string="Notes">
<field name="note_id" nolabel="1"/>
</page>
</notebook>
</sheet>

28
employee_orientation/views/orientation_request_mail_template.xml

@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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)}</field>
<field name="email_to">${object.partner_id.email}</field>
<!--<field name="partner_to">${object.partner_id.work_email}</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 prepare below checklist.</p>
<p>Check_Line: ${object.request_name}</p>
<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/>
@ -45,16 +46,19 @@
</record>
<record id="orientation_training_mailer" model="mail.template">
<field name="name">Employee Training program</field>
<field name="email_from">${(object.user_id.email)}</field>
<field name="email_to">${object.program_convener.work_email}</field>
<!--<field name="partner_to">${object.partner_id.work_email}</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</p>
<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/>

3
employee_orientation/wizard/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import orientation_complete

26
employee_orientation/wizard/orientation_complete.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from openerp 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'})

23
employee_orientation/wizard/orientation_complete.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<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>
</openerp>
Loading…
Cancel
Save