-
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF] hr_course: training plan planning ISO 9001
- Loading branch information
1 parent
0409ae1
commit c4bb6d3
Showing
13 changed files
with
456 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="hr_course_category_it" model="hr.course.category"> | ||
<field name="name">Department IT</field> | ||
</record> | ||
<record id="hr_course_category_language" model="hr.course.category"> | ||
<field name="name">Languages</field> | ||
</record> | ||
<record id="hr_course_qsa" model="hr.course"> | ||
<field name="name">Qualified Security Assessor Training (QSA)</field> | ||
<field name="category_id" ref="hr_course_category_it" /> | ||
</record> | ||
<record id="hr_course_isa" model="hr.course"> | ||
<field name="name">Internal Security Assessor Training (ISA)</field> | ||
<field name="category_id" ref="hr_course_category_it" /> | ||
</record> | ||
<record id="hr_course_schedule_qsa_october" model="hr.course.schedule"> | ||
<field name="name">QSA October</field> | ||
<field name="course_id" ref="hr_course_qsa" /> | ||
<field name="start_date">2021-10-21</field> | ||
<field name="end_date">2021-10-21</field> | ||
<field name="cost">100</field> | ||
<field name="authorized_by" ref="hr.employee_hne" /> | ||
</record> | ||
<record id="hr_course_schedule_qsa_november" model="hr.course.schedule"> | ||
<field name="name">QSA November</field> | ||
<field name="course_id" ref="hr_course_qsa" /> | ||
<field name="start_date">2021-11-29</field> | ||
<field name="end_date">2021-11-29</field> | ||
<field name="cost">100</field> | ||
<field name="authorized_by" ref="hr.employee_hne" /> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record model="ir.rule" id="hr_employee_course_rule"> | ||
<field name="model_id" ref="model_hr_course_schedule" /> | ||
</record> | ||
<record model="ir.rule" id="hr_employee_course_manager_rule"> | ||
<field name="model_id" ref="model_hr_course_schedule" /> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade # pylint: disable=W7936 | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.load_data( | ||
env.cr, "hr_course", "migrations/13.0.2.0.0/noupdate_changes.xml" | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
SELECT setval('hr_course_schedule_id_seq', MAX(id)) | ||
FROM hr_course_schedule | ||
""", | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
SELECT setval('hr_course_id_seq', MAX(id)) | ||
FROM hr_course | ||
""", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade # pylint: disable=W7936 | ||
|
||
_models_renames = [ | ||
("hr.course", "hr.course.schedule"), | ||
] | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.rename_models(env, _models_renames) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
SELECT id, name, category_id, permanence, permanence_time | ||
INTO hr_course | ||
FROM hr_course_schedule | ||
""", | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, "ALTER TABLE hr_course_schedule ADD course_id int4" | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE hr_course_schedule | ||
SET course_id = id | ||
""", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
To create a Course go to Employees -> Courses. | ||
|
||
To create a Training Schedule go to Employees -> Courses Schedule. | ||
|
||
Fill the information and click assign attendees to continue. Assign them and | ||
then start the course. | ||
then start the course session. | ||
|
||
One it has finished you must enter the results and finish the course. | ||
One it has finished you must enter the results and finish the course session. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.