@ -1,23 +1,20 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
############################################################################## |
################################################################################### |
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
# Cybrosys Technologies Pvt. Ltd. |
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).# |
||||
# Author: Nilmar Shereef(<http://www.cybrosys.com>) |
# This program is free software: you can modify |
||||
# you can modify it under the terms of the GNU LESSER |
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
# published by the Free Software Foundation, either version 3 of the |
||||
# |
# License, or (at your option) any later version. |
||||
# 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, |
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# 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 |
# You should have received a copy of the GNU Affero General Public License |
||||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
# If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
# |
||||
############################################################################## |
################################################################################### |
||||
from . import models |
from . import models |
||||
|
from . import wizard |
||||
|
@ -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. |
|
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 90 KiB |
Before 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 |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 48 KiB |
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
from . import orientation_complete |
@ -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'}) |
@ -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> |