Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
4,431 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:alt: License: AGPL-3 | ||
|
||
======== | ||
Training | ||
======== | ||
|
||
This module was written to extend the functionality of events to support | ||
trainings and allow you to manage training actions, training groups, | ||
training hour types, training materials, etc. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
* Have *Training / User* or *Training / Manager* permissions. | ||
* Go to the new menu item called *Training*. | ||
|
||
The *Training* menu | ||
------------------- | ||
|
||
There you can find the following menus, depending on your permissions: | ||
|
||
Actions | ||
~~~~~~~ | ||
|
||
Training actions define the structure of a course. | ||
|
||
They have a name, such as *Prevention of occupational hazards, Office | ||
software, Odoo user basic training*, etc. | ||
|
||
They are classified with action types. Depending on it, they define how many | ||
hours of each type are expected to be teached. | ||
|
||
You can define the training materials that should be delivered to students to | ||
accomplish the action. | ||
|
||
You can specify the grade settings: which is the minimal and maximum grade | ||
possible for this course, and which grade students need to reach to pass the | ||
course. | ||
|
||
Also you can define the contents of this course. They will appear in the back | ||
side of the diploma if available. You have a field called *Append template* | ||
that will help you to fulfill the contents in some complex layouts. | ||
|
||
Action Types | ||
~~~~~~~~~~~~ | ||
|
||
Depending on the type of hours that a training action is expected to have, the | ||
training action has that action type. For instance: | ||
|
||
- A training of type *on-site* may expect only *on-site* hours. | ||
- A training of type *online* may expect only *online* hours. | ||
- A training of type *remote* may expect only *remote* hours. | ||
- A training of type *mixed* may expect *on-site*, *online* and *remote* hours. | ||
|
||
You can define action types and the expected type of hours in this menu. | ||
|
||
Hour Types | ||
~~~~~~~~~~ | ||
|
||
Hours in each training action are separated by type. Types of hours can be *On | ||
site, Online, Remote* and anything you decide. | ||
|
||
For instance, a training action of *online* type cannot have *on-site* hours. | ||
|
||
Materials | ||
~~~~~~~~~ | ||
|
||
A material is a resource used for training. These resources are expected to be | ||
delivered to every student when starting the training process. | ||
|
||
Example materials are: study book, notebook, pen, etc. | ||
|
||
Material types | ||
~~~~~~~~~~~~~~ | ||
|
||
Materials are not always physical. For example, for online courses a *material* | ||
could be a username and password for your training website. | ||
|
||
In this menu you can set up all the types of your materials. | ||
|
||
Groups | ||
~~~~~~ | ||
|
||
A training group is a course that belongs to a training action. Most of the | ||
time you will likely use this menu. | ||
|
||
They have all details about it: students, start and end dates, materials | ||
delivered, etc. | ||
|
||
Technically speaking, groups are just events that are assigned to a training | ||
action. Therefore, you can use also the events view to manage training groups, | ||
but the *Training* menu is a more consistant place to manage training groups, | ||
and when using that view you will be required to set a training action. | ||
|
||
Registrations (inside Groups form view) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
These are similar to event registrations too, but with some additions: | ||
|
||
- Set a grade for the student and see if it is passing the course | ||
automatically (it compares with the passing grade in the training action). | ||
- Quick access to the training action. | ||
- Check if materials were deliverede to the registrant. | ||
|
||
There are also these reports here: | ||
|
||
- *Diploma / Certificate*. If the attendee has completed and passed the | ||
course, it will print a diploma. Otherwise, it will print a certificate of | ||
assistance. | ||
- *Diploma / Certificate Delivery Receipt*, to proof the diploma or | ||
certificate was delivered to the attendee. | ||
- *Training Materials Delivery Receipt*, to proof the materials were | ||
delivered to the attendee. | ||
|
||
You might want to check the box *Materials delivered* in the registration | ||
form when any attendee signs this report. | ||
|
||
Partner views | ||
------------- | ||
|
||
If you access a partner view from any module, you will be able to print a new | ||
report called *Training Attendance Certificate*. It will display the status of | ||
all registrations made in the name of this partner (and/or its contacts if it | ||
is a company). | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/199/8.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/event/issues>`_. In | ||
case of trouble, please check there if your issue has already been reported. If | ||
you spotted it first, help us smashing it by providing a detailed and welcomed | ||
feedback `here | ||
<https://github.com/OCA/event/issues/new?body=module:%20training%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Jairo Llopis <j.llopis@grupoesoc.es>. | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis | ||
|
||
from . import models |
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,45 @@ | ||
# -*- coding: utf-8 -*- | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis | ||
|
||
{ | ||
"name": "Training", | ||
"version": "8.0.3.0.0", | ||
"category": "Project", | ||
"author": "Grupo ESOC Ingeniería de Servicios, S.L.U., " | ||
"Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"website": "http://www.grupoesoc.es", | ||
"installable": True, | ||
"application": True, | ||
"summary": "Extend events with training capabilities", | ||
"depends": [ | ||
"partner_event", | ||
"report", | ||
], | ||
"data": [ | ||
"data/training.duration_type.csv", | ||
"data/training.action_type.csv", | ||
"data/training.material_type.csv", | ||
"data/training.material.csv", | ||
"security/training.xml", | ||
"security/ir.model.access.csv", | ||
"views/menus.xml", # Must be loaded first | ||
"views/action.xml", | ||
"views/action_type.xml", | ||
"views/diploma_delivery_receipt_report.xml", | ||
"views/diploma_report.xml", | ||
"views/duration_type.xml", | ||
"views/event.xml", | ||
"views/event_registration.xml", | ||
"views/material.xml", | ||
"views/material_delivery_receipt_report.xml", | ||
"views/material_type.xml", | ||
"views/training_attendance_certificate_report.xml", | ||
], | ||
"demo": [ | ||
"demo/training.action.csv", | ||
"demo/training.duration.csv", | ||
"demo/event.event.csv", | ||
], | ||
} |
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,8 @@ | ||
id,name,expected_duration_type_ids:id | ||
action_type_on_site,On site,duration_type_on_site | ||
action_type_online,Online,duration_type_online | ||
action_type_remote,Remote,duration_type_remote | ||
action_type_mixed,Mixed,"duration_type_on_site,duration_type_online,duration_type_remote" | ||
action_type_on_site_remote,On site and remote,"duration_type_on_site,duration_type_remote" | ||
action_type_on_site_online,On site and online,"duration_type_on_site,duration_type_online" | ||
action_type_remote_online,Remote and online,"duration_type_remote,duration_type_online" |
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,4 @@ | ||
id,name | ||
duration_type_on_site,On site | ||
duration_type_online,Online | ||
duration_type_remote,Remote |
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,6 @@ | ||
id,name,type_id:id | ||
material_pen,Pen,material_type_physical | ||
material_study_book,Study book,material_type_physical | ||
material_notebook,Notebook,material_type_physical | ||
material_username,User name,material_type_electronic | ||
material_password,Password,material_type_electronic |
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,3 @@ | ||
id,name | ||
material_type_physical,Physical | ||
material_type_electronic,Electronic |
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,4 @@ | ||
id,training_action_id:id | ||
event.event_0,action_open_days | ||
event.event_1,action_user_training | ||
event.event_3,action_developer_training |
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,4 @@ | ||
id,name,type_id:id | ||
action_open_days,Odoo open days,action_type_mixed | ||
action_user_training,Odoo user training,action_type_online | ||
action_developer_training,Odoo developer training,action_type_on_site |
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,5 @@ | ||
id,duration,action_id:id,type_id:id | ||
duration_1,20,action_open_days,duration_type_on_site | ||
duration_2,40,action_open_days,duration_type_online | ||
duration_3,80,action_user_training,duration_type_online | ||
duration_4,20,action_developer_training,duration_type_on_site |
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,63 @@ | ||
# -*- coding: utf-8 -*- | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis | ||
|
||
from openerp import _, exceptions | ||
|
||
|
||
class TrainingValidationError(exceptions.ValidationError): | ||
def __init__(self, value): | ||
super(TrainingValidationError, self).__init__(value) | ||
self.name = _("Error(s) with the training data.") | ||
|
||
|
||
class TrainingValidationWarning(exceptions.Warning): | ||
def __init__(self, value): | ||
super(TrainingValidationWarning, self).__init__(value) | ||
self.name = _("Error(s) with the training data.") | ||
|
||
|
||
class GradeLimitError(TrainingValidationError): | ||
def __init__(self, | ||
registration, | ||
value=_("Grade %(grade)f for %(student)s does not fit " | ||
"between %(min)f and %(max)f.")): | ||
value = value % { | ||
"grade": registration.grade, | ||
"student": registration.name, | ||
"min": registration.event_id.training_action_id.grade_min, | ||
"max": registration.event_id.training_action_id.grade_max, | ||
} | ||
self.registration = registration | ||
super(GradeLimitError, self).__init__(value) | ||
|
||
|
||
class GradeLimitIncoherentError(TrainingValidationError): | ||
pass | ||
|
||
|
||
class NoMaterialsToDeliverError(TrainingValidationError): | ||
def __init__(self, value=_("No materials are set in the event.")): | ||
super(NoMaterialsToDeliverError, self).__init__(value) | ||
|
||
|
||
class ChangeDeliveredMaterialsWarning(TrainingValidationWarning): | ||
def __init__(self, | ||
value=_("Yoy are changing materials that have been delivered " | ||
"already.")): | ||
super(ChangeDeliveredMaterialsWarning, self).__init__(value) | ||
|
||
|
||
class WrongDurationTypeError(TrainingValidationError): | ||
def __init__(self, | ||
invalid_hour_type, | ||
valid_hour_types, | ||
value=_("Hour type '%(hour_type)s' is not among the valid " | ||
"ones defined in the training type " | ||
"(%(training_type)s).")): | ||
self.invalid_hour_type = invalid_hour_type | ||
self.valid_hour_types = valid_hour_types | ||
value = value % {"hour_type": invalid_hour_type.name, | ||
"training_type": ", ".join(valid_hour_types | ||
.mapped("name"))} | ||
super(WrongDurationTypeError, self).__init__(value) |
Oops, something went wrong.