immersion : Immersion trainings

This document describes the lino_welfare.modlib.immersion plugin.

A tested document

This is a tested document. The following instructions are used for initialization:

>>> from lino import startup
>>> startup('lino_welfare.projects.mathieu.settings.demo')
>>> from lino.api.doctest import *

Configuration

A system administrator can select Configure ‣ Integration ‣ Immersion training types to configure the list of “immersion training types” (immersion.ContractType).

The default data for this table is generated by the std fixture:

>>> rt.show(immersion.ContractTypes)
... 
=========================== =========================== ===================== ===================== ================
 Désignation                 Désignation (de)            Désignation (en)      Régime d'évaluation   Modèle
--------------------------- --------------------------- --------------------- --------------------- ----------------
 MISIP                       MISIP                       MISIP                                       Default.odt
 Mise en situation interne   Mise en situation interne   Internal engagement                         Default.odt
 Stage d'immersion           Stage d'immersion           Immersion training                          StageForem.odt
=========================== =========================== ===================== ===================== ================

Demo data

lino_welfare.modlib.immersion.models.Contract

>>> rt.show(immersion.Contracts)
... 
==== ========================== ======================== ================== ============ ================= ===========================
 ID   Bénéficiaire               Organisation             Début de contrat   Fin prévue   Titulaire (ISP)   Type de stage d'immersion
---- -------------------------- ------------------------ ------------------ ------------ ----------------- ---------------------------
 1    ENGELS Edgar (129)         Rumma & Ko OÜ            10/11/2012         05/03/2014   Alicia Allmanns   MISIP
 2    ENGELS Edgar (129)         Bäckerei Ausdemwald      06/03/2014         12/01/2015   Mélanie Mélard    Mise en situation interne
 3    LAMBERTZ Guido (142)       Belgisches Rotes Kreuz   29/12/2012         23/04/2014   Alicia Allmanns   Stage d'immersion
 4    RADERMACHER Edgard (157)   Bäckerei Ausdemwald      16/02/2013         11/06/2014   Alicia Allmanns   MISIP
 5    RADERMACHER Edgard (157)   Bäckerei Mießen          12/06/2014         12/07/2014   Mélanie Mélard    Mise en situation interne
 6    RADERMACHER Edgard (157)   Bäckerei Schmitz         13/07/2014         21/05/2015   Mélanie Mélard    Stage d'immersion
 7    RADERMECKER Rik (173)      Bäckerei Ausdemwald      06/04/2013         12/02/2014   Caroline Carnol   MISIP
 8    RADERMECKER Rik (173)      Bäckerei Mießen          13/02/2014         08/06/2015   Hubert Huppertz   Mise en situation interne
==== ========================== ======================== ================== ============ ================= ===========================

Immersion trainings with external partner

French-speaking PCSWs use a custom template imposed by FOREM when printing immersion trainings with some external partner.

>>> obj = immersion.Contract.objects.get(pk=3)
>>> print(str(obj.company))
Belgisches Rotes Kreuz
>>> bm = printing.BuildMethods.appyodt
>>> ex = obj.printed_by
>>> print(ex.do_print.bound_action.action.get_print_templates(bm, ex)[0])
... 
StageForem.odt