Issues #682 (umbrella), #683 (phase 1: calls and applications), #684 (phase 2: scoring and
interviews), #685 (phase 3: resolutions, claims and place offers), #686 (phase 4: the staff
call) and #687 (phase 5: mobility preparation). Design of the whole project: plans/erasmus_portal.md.
This page describes what is implemented. Group mobilities (KA121-VET, issues #701-#704) are in
group_mobility.md.
The centre publishes a yearly Erasmus+ call for its vocational training students (CFGM/CFGS, any
year). Students apply from the portal (/my/erasmus), upload the documents the call asks for and
follow their application; the Erasmus team checks the requirements and the documents, asks for
corrections (subsanation) and admits or excludes each application, then scores the admitted ones (record average, interview,
languages, fewer opportunities, first mobility, conduct warnings) and ranks them per modality.
The resolutions, approved by the Erasmus coordinator, are published on the portal, claims are recorded, and the places are
offered to the selected and, when one is renounced, to the next reserve. The centre’s vocational
training staff apply to their own call from the backend (see “Staff in the backend”); a panel rates
their mobility plans (see “Staff call”). Once a place is accepted, the mobility is prepared in EMS: destination,
host entity, documents and checklist (see “Mobility preparation” at the end).
erDiagram
ems_erasmus_call ||--o{ ems_erasmus_call_modality : "modality_ids"
ems_erasmus_call ||--o{ ems_erasmus_call_project : "project_place_ids (staff)"
ems_erasmus_call_project }o--|| ems_erasmus_project : "project_id"
ems_erasmus_call ||--o{ ems_erasmus_call_document : "document_ids"
ems_erasmus_call ||--o{ ems_erasmus_application : "application_ids"
ems_erasmus_call_modality }o--o{ ems_level : "level_ids"
ems_erasmus_application }o--|| res_partner : "partner_id (student)"
ems_erasmus_application }o--|| ems_erasmus_call_modality : "modality_id"
ems_erasmus_application ||--o{ ems_erasmus_application_document : "document_ids"
ems_erasmus_application_document }o--|| ems_erasmus_call_document : "call_document_id"
ems_erasmus_application_document }o--o{ ir_attachment : "attachment_ids (every version)"
| Model | Purpose |
|---|---|
ems.erasmus.call |
One call: who applies (audience: students or staff), course, dates (date_open, date_close, optional subsanation_deadline), the published call PDF, the text shown on the portal, state. |
ems.erasmus.call.modality |
A selection list with its own places (GM, GS): places, the levels whose students compete in it, and the project kind (KA121-VET / KA131-HED), computed from the levels (issue #767: CFGS and EFPS on KA131-HED, any other level on KA121-VET; stored). Students’ calls only (issue #772). The real destinations are ems.erasmus.destination lines. |
ems.erasmus.call.project |
Issue #772: a staff call’s places paid by one project (project_id, places, unique per call; assigned_count: the call’s non-cancelled mobilities on it, one _read_group). Field project_place_ids of the call, groups Erasmus team and admin, ACL for those two only: the rest read the total through _ems_places() (sudo). Not copied with the call (each year has its projects). |
ems.erasmus.call.document |
A document the call asks for: required, optional or required for minors; confidential (only the Erasmus team sees it). |
ems.erasmus.application |
One student’s application to one call (unique per call and student). |
ems.erasmus.application.document |
The files uploaded for one document of the call, with the team’s review. |
The modalities and documents are copied when a call is duplicated, so next year’s call starts from this year’s.
Who can apply is decided by the modalities, not by code: a student can apply when the level of their main group is in one of the call’s modalities, and that modality is the application’s. Any year of the cycle.
stateDiagram-v2
[*] --> draft
draft --> published: Publish (needs a modality and a required document)
published --> draft: Back to draft (no application submitted yet)
published --> closed: Close applications
closed --> [*]
A published call is shown on the portal to every student who can apply to it. Applications are
accepted only while it is published and the company’s local time is between date_open and
date_close (is_accepting, computed with ems.datetime_utils, never the browser’s clock).
Closing turns every application still in draft into Not submitted.
Phase (issue #785). state only says whether applications are taken; the form’s status bar
and the call list show phase, a stored compute on state, the published resolutions and the
offers’ state: Draft and Published as the state; once closed, Scoring until the provisional
resolution is published (the admission list is still part of it), Resolution until the
definitive, then Offers while an offer waits for an answer and Places assigned (key finished)
when none does: the students may still be choosing their destination, so it doesn’t say “Finished”
(C23, 2026-11-13). A place offered to a reserve later moves it back to Offers. Business rules keep reading state.
The four deadlines after closing are filled in by EMS from date_close (_ems_deadlines(), the
same for students’ and staff calls): that many days after the closing day (DEADLINE_DAYS:
corrections 7, interview/evaluation 14, claims 19, acceptance 25), at 14:00 in the centre
(DEADLINE_HOUR), moved to the next school day when that day is a weekend, a public holiday or a
school break (resource.calendar.leaves._ems_nth_school_days(), shared with the ex officio
withdrawal circuit, which reads the holidays once for the four deadlines). create() fills the ones not given; write() and the onchange of
date_close move the ones still empty or equal to what the old closing date gave
(_ems_following_deadlines()), so a deadline changed by hand stays. A new, unsaved call has no
earlier closing date to compare with: in the form, all four follow every closing date set.
date_order_warning (non-stored) lists the dates out of the process order (PROCESS_DATES:
open, close, then the four deadlines), each against the first earlier step that comes after it.
The form shows it as a warning above the settings; saving is not refused, since a deadline is
sometimes moved on purpose (e.g. the claims one brought forward once every claim is answered).
reminder_days is 3 by default; it is not in the call’s form, only in the notice wizard.
Publishing tells nobody. action_announce opens the ems.erasmus.call.announce wizard (Erasmus
team only), which counts the recipients and calls _ems_send_announce(); the hourly cron
ir_cron_erasmus_remind_closing (_cron_remind_closing()) sends the reminder. Both go through
_ems_announce(), which tells each recipient the way their audience is reached (issue #802):
| Notice | Reminder | |
|---|---|---|
| Triggered by | the Erasmus team, from the call (any number of times) | the cron, once per call (reminder_date) |
| When | while published and not closed (before date_open too) |
from reminder_days days before the closing day (local), from 9:00 (REMINDER_HOUR), while is_accepting, and only if announce_date is set |
| To | _ems_eligible_partners() |
the same, minus the partners with an application not in draft |
| Students’ call | email_template_erasmus_call_open, to the school address |
email_template_erasmus_call_reminder, to the school address |
| Staff call | an ems.info_notice on the call, for the daily summary |
the same |
| Recorded in | announce_date, announce_count, chatter |
reminder_date, reminder_count, chatter |
_ems_eligible_partners() mirrors the portal’s rule (res.partner._ems_erasmus_calls()) in the
other direction, for the whole centre in a few queries: students whose main group is of a modality’s
level (conduct warnings rule nobody out); staff, the internal users of the teachers of
staff_level_ids plus validator_ids.
res.partner._ems_erasmus_email()),
the one they read every day and sign in to the portal with.
_ems_announce() renders the template once per language (send_mail for the first recipient)
and creates one mail.mail per recipient with the same values, so nobody sees another address.
Students without a school address get nothing and are counted in the wizard (“Without a school
email address”). Families never receive these emails._ems_announce_to_staff() queues an ems.info_notice on the call for each recipient’s next
daily summary, written in their language with the closing date and where to apply (Erasmus+ >
My participation > Staff calls). The summary links the call; get_formview_id()
(staff_backend.py) opens it in the staff’s own form for whoever can apply and doesn’t manage
the calls.Every notice and reminder sent is also recorded as a diffusion action (quality.py, channel
“Email from EMS”, which covers the daily summary too).
stateDiagram-v2
[*] --> draft: first save on the portal
draft --> submitted: Submit (every required document uploaded)
submitted --> submitted: edit and submit again (until date_close)
draft --> not_submitted: call closed
submitted --> subsanation: Request corrections (team)
subsanation --> submitted: applicant uploads and submits again
submitted --> admitted: Admit (team)
submitted --> excluded: Exclude (team, with a reason)
subsanation --> excluded: Exclude
admitted --> submitted: Back to review
excluded --> submitted: Back to review
write() refuses a direct change).email_template_erasmus_application_submitted), with a copy to the family when EMS keeps it
informed (a minor’s, _ems_mail(family_copy=True)). Each new submission sends a new receipt. A
new students’ call asks for no family authorisation to apply: the family is informed by that copy
and signs the commitment letter once the place is accepted.
The receipt (and every document list in an email, _ems_mail_document_list) shows only the files
that count (ems.erasmus.application.document._ems_current_files()): every file, or only the
newest of a call document with single_file (the default; unticked for the language
certificates), and a link by its address (ir.attachment._ems_erasmus_labels()).subsanation_deadline still to come (without one the email gave no date
and _ems_subsanation_open() never closed); it emails the list and the call’s subsanation_deadline
(email_template_erasmus_application_subsanation). Those lines get correction_requested;
until the deadline the applicant can upload to them only (not change the answers, nor other
documents) and submit again, which clears the flags. Submitting a correction schedules a to-do
for every member of the Erasmus team (_ems_ask_review, call._ems_erasmus_team(): the
ems.group_erasmus internal users), so it shows in their daily pending-tasks digest; admitting,
excluding or asking for corrections again marks it done._ems_has_files(): one of the
participant’s, or of the team for a document the team provides), from the button or from the
list’s own field (write() in document_review.py). Admitting a staff application whose employee
file has no DNI/NIE nor passport (_ems_identity_document()) still admits it, but warns the team
(sticky notification and a chatter note): only the Secretary fills it in, and the resolution lists
cannot be prepared without it. Preparing a resolution with an incomplete score names, per person,
what is missing (_ems_score_missing(), by the fields’ labels). Exclude needs the exclusion reason. It also deletes the
application’s evaluations still to score (interviews, plan ratings) with their to-dos, and, once
the admission list is published (e.g. not attending the interview), emails the reason
(email_template_erasmus_application_excluded) instead of leaving it for the next list; the
portal’s “what to do now” box shows the reason too.res.partner._ems_erasmus_email(): a student’s
school address (student_email, never the personal one, adriamt 2026-11-09, issue #802), anybody
else’s email. Every Erasmus+ email to a student goes through it (_ems_mail(), the call’s
notice and reminder, the satisfaction survey), except the electronic signature request, which
sign_oca sends with message_notify to the signer’s main email (the participant can also sign
from the portal). The family gets its copies at its own address (a copy only of the place offered and of
the answer to it, see Place offers, whenever EMS keeps it informed about the student: a minor, or
an adult who authorized sharing with the family, res.partner._ems_informed_recipients(), the same
rule as convalidations); a recipient without one is noted in the chatter.
Their reply-to is whoever on the team caused the email (_ems_reply_to()), else the centre’s
Erasmus+ mailbox, res.company.erasmus_contact_email (Settings > Center Data > Erasmus+, the same
for every call; it defaults to the centre’s address, like google_ws_domain, so an upgrading
installation gets it too), for the receipts and reminders sent with nobody of the team behind them.Every upload adds an attachment to the document line; earlier files are never removed, so every version stays. A new upload puts the line back to Pending review. The team marks each line Valid or Needs changes (with a comment the applicant sees on the portal).
Every file field of the Erasmus+ views uses the ems_attachments widget (eye: Odoo’s file viewer;
download; remove while editable). Odoo’s stock many2many_binary is no longer used in
views/erasmus/. The call’s Bases PDF is a single Binary field with its own pencil, download and
bin, not a many2many, and is left as it is.
A document whose own confidential field is set (ems.erasmus.application.document and
ems.erasmus.project.document; the view must carry that field, as column_invisible) is view only:
emsViewOnly; file_viewer_view_only.js
then hides the viewer’s Download and Print buttons and, in a PDF, the reader’s own download,
print and open buttons.ir.binary._get_stream_from (models/erasmus/binary.py) refuses the download of such a file when
/web/content or /web/image pass download_attachments=True (?download=true): the controllers
turn the UserError into a 404. Without download the file is served to whoever the record rules
let read it (the Erasmus team and the administration; the Head of Studies and the panel never
reach it) and an opening is added to the owner’s chatter (the application, or the project):
author, file and time, once per person and file within ten minutes. /web/content runs on a
read-only cursor, so the note is written in a cursor of its own (a write on it would only fail and
make Odoo retry the request, with an ERROR in the log). The portal controllers don’t set the context key, so an
applicant still downloads their own files, and the audit export (include_confidential, only the
coordinator) reads the files through the ORM, unchanged.Requirements (enrolled in a modality’s level, no previous Erasmus+ internship in this cycle,
family authorization if minor): recorded by the Erasmus team, with result (Pending, Met,
Not met), author and date stamped by write().
Conduct (students’ call, art. 6), never recorded by hand: EMS has no register of
disciplinary sanctions, only the conduct warnings (ems.strike), and the coexistence team reviews
a case each time a student reaches res.company.strike_escalation_threshold warnings (3 by
default). That number rules nobody out (adriamt, 2026-11-03): art. 6 says the Erasmus team may
exclude, with a reason and having heard the teaching team and the coexistence team, a student with
disciplinary records or serious coexistence incidents this course. EMS only points them out:
call._ems_course_strike_count(partner) counts their warnings since 1 September of the call’s
course (ems.course.date_range(), centre’s timezone), shown on the application as
course_strike_count and conduct_review (non-stored, true at the threshold or above, via
_ems_conduct_blocked_count(); a threshold of 0 disables it; staff calls never). The form warns
the team at the top while the application is under review, and Exclude (with its reason) does
the rest. Criterion F, the scoring’s penalty per warning, still applies to whoever goes on. Group
mobilities follow the same rule (the coordinator’s exclusion is a result exception there).
Application documents (the 2026-11-03 review). Each call document says how it is handed in
(upload_kind): files, PDF only (_ems_add_files refuses a file not named .pdf or not
starting with %PDF: the CV sent to companies) or a link (the presentation video on Google
Drive: _ems_add_link keeps it as an ir.attachment of type url, so the line’s file state, the
review and the submit check treat it like a file; the dossier ZIP writes it as an Internet shortcut,
.url). help_url is shown with the instructions (the Europass editor). The requirement
fewer_opportunities makes a line required only when the applicant declares fewer opportunities
(is_required); the portal renders those documents under the fewer opportunities box and hides
them with CSS until it is ticked (:has(), no script). The portal form puts the documents first,
then fewer opportunities, then the notes; there is no availability question (the dates are in the
rules).
The Head of Studies and the Director read the applications; they write nothing on them.
Staff (the Erasmus team, evaluators, the panel, validators, the Secretary, tutors) never get an
Erasmus+ email on the spot: nothing in the process is urgent (agreed 2026-11-05). Every to-do is an
activity scheduled with mail_activity_quick_update (no “assigned to you” email) and reaches its owner
in the daily summary; a notice that asks for nothing (the tutor’s “your student accepted a place”, the
evaluators’ list of interviews) is an ems.info_notice for that same summary (see
daily_summary.md). Students and families keep their emails.
controllers/portal_erasmus.py)The call’s Information for applicants (description, shown above the form) and the group
mobility’s Information for students use the ems_html_codeview widget
(static/src/js/backend/html_codeview_field.js, issue #774): Odoo’s own html field with its code
view (</>) in a fixed toolbar, so the Erasmus team can paste a card prepared elsewhere with the
Bootstrap classes the portal already ships. Pasting rendered HTML into the editor drops the
classes; the code view keeps them, and the field’s default sanitizing keeps class (not
style). Odoo’s own codeview option only shows the button in developer mode, which is why
the widget turns it on itself; the fixed toolbar is EmsHtmlBlockField’s, the minutes’ one.
| Route | What |
|---|---|
GET /my/erasmus |
The person’s own applications, the calls open to them now, and the others folded. |
GET /my/erasmus/call/<id> |
The application form for that call. |
POST /my/erasmus/call/<id>/save |
Save answers and uploads; with submit, submit too. |
GET /my/erasmus/call/<id>/rules |
Download the call PDF. |
The applicant is always request.env.user.partner_id: no partner or application id travels in a
form. The controller works with sudo() (portal users have no ACL on these models) and checks
eligibility and state itself. A refused action (a UserError) goes back to the page with
?error=1 and its own message, kept in the session for that one redirect
(_ems_error_redirect/_ems_error_message): “Upload the required documents first:
The page lists the person’s own applications first (My applications), then the calls they can
apply to now (Open calls), and folds the rest (not open yet, or closed) under Other calls. Each
application, on that page and on its own, shows a step bar and a “what to do now” box, both from
ems.erasmus.application._ems_portal_progress(): eight steps (application, document check,
interview or plan rating, resolution, place, preparation, stay, return), each done, current,
todo or failed (where an excluded, not submitted, not selected or renounced application ended),
and the next action with its deadline and colour (warning when the person has something to do).
On a phone (below Bootstrap’s sm breakpoint) the bar is hidden and its position is shown
instead, “Step N of 8” and the step’s name (issue #785: eight steps broke into two lines).
The state badge is coloured by PORTAL_STATE_BADGES. The corrections asked for and the interview
are in that box (its class keeps o_ems_erasmus_subsanation / o_ems_erasmus_interview). Once the
application can no longer change, the call’s text and the form fold under The call and my
application; of the published results, the newest is open and the earlier ones folded. A defined
mobility (preparing or closed) is split into tabs (Summary, My record, Steps, During the stay, On
return), opened on the one with something to do.
The form never asks whether the student took part in Erasmus+ before: First mobility (criterion E) is the Erasmus team’s, checked against the person’s history below.
New group ems.group_erasmus (“Erasmus+ / Manager”), assigned through the roles Erasmus
coordinator (ems.role_erasmus) and Erasmus mobility technician (ems.role_erasmus_technician).
The coordinator’s role gives ems.group_erasmus_coordinator (“Erasmus+ / Coordinator”, implies
Manager), the only one besides ems.group_academic_admin that can publish a resolution (#686: the
coordinator alone approves them). The administrator is a member of both.
| Model | Erasmus team | Head of Studies / Director | Portal |
|---|---|---|---|
ems.erasmus.call, .modality, .document |
rwcu | r | via controller (sudo) |
ems.erasmus.application |
rwcu | r | via controller |
ems.erasmus.application.document |
rwcu | r, not confidential ones (ir.rule) |
via controller |
Menu Erasmus+, in sections like the rest of EMS, each shown only to whoever sees one of its entries:
| Section | Entries |
|---|---|
| Calls | Calls, Applications, Ranking, Resolutions, Claims, Place offers (the order of the process, issue #789) |
| Mobilities | Pending validation, Individual mobilities, Group mobilities |
| Projects | An entry of its own, no submenu (action_erasmus_project: the economic list, its pivot and the form; issue #789) |
| Financial management | Grant payments, Services paid by the centre, Project expenses |
| Quality | Indicators, Satisfaction surveys, Low scores, Diffusion actions |
| My participation | Interviews to score, Plans to rate, My group mobilities, Staff calls, My applications, My mobilities |
| Configuration | Host entities, Organisational support rates, Earlier course indicators |
Every teacher has the app (right below Meetings), at least for My participation > My
application, which opens their portal page /my/erasmus (an ir.actions.act_url): that is where
staff apply to the staff call and follow their mobility, the Erasmus+ team included. Opening the app
runs its first entry, so My participation goes after the management sections (the team lands on
the calls) and My application last in it (an interviewer or a panel member lands on their own
scoring, a teacher with nothing else on their portal page). The personal entries other than My
application only show to whoever has something there. Each one has its own hidden group, managed by EMS (res.users._ems_sync_erasmus_evaluator_group,
_ems_sync_erasmus_group_teacher_group), so nobody sees an entry with nothing in it: an interviewer
is in ems.group_erasmus_evaluator, a panel member with plans to rate in ems.group_erasmus_panel.
The call’s form opens each step of its own process with a stat button (ems.erasmus.call.
_ems_call_action, an action narrowed to the call): Applications, Ranking, Interviews (students)
or Plan ratings (staff), Resolutions, Claims, Place offers and Mobilities. Interviews and Plan
ratings have no menu entry: they are only reached from their call.
session_info (models/erasmus/ir_http.py) gives a member of the Erasmus team who is not a teacher the
calls (action_erasmus_call) as home when theirs is still the roll call every new account copies
from base.default_user, which they cannot open (_ems_erasmus_home_action); a home chosen on
purpose is kept.
A new call shows its defaults before it is saved: default_get() and the audience onchange (on an
unsaved call) fill them from _ems_audience_defaults(), the same dict create() uses for whatever
is still empty. The onchange assigns each list as new records, not as commands: document_ids and
preparation_document_ids are lines of the same model, and replacing one with commands brought back
lines of the other.
Default texts in every language (issue #780). The texts a new call starts with are translatable
fields (translate=True): the modality’s name, the call document’s and checklist step’s name and
description, the self-assessment question’s name and the call’s commitment_text; a group
mobility’s tie_break and its documents (requirement_ids) too. Odoo stores a new text only in the
creator’s language, so after create() (and after a write() that adds lines from the form, e.g.
on changing audience) models/erasmus/default_data.py rebuilds the defaults once per installed
language and gives every line still holding a default (matched by name, then instructions) that
default’s translations (update_field_translations). A line renamed in the form before saving is
not matched and keeps what was written, with Odoo’s usual fallback. A copy keeps the translations
(Odoo’s copy_translations). Calls created before keep their texts: the upgrade only turns the
columns into translatable ones, with the old value as the source. The trade-off: changing a
default text later in one language leaves the others as they were (the form’s language button edits
them). A staff call has no modalities (issue #772).
A staff call has no preparation step (teachers have no preparation sessions, and the activities
left for their groups go on Moodle, outside EMS), and Share it at a department or cycles meeting
is requirement='optional' (art. 15): an optional step
(TASK_REQUIREMENTS) is listed (on the portal with “(optional)”) but never counts towards
preparation_complete/return_complete (is_required False).
Subjects of the to-dos built with a name go through
ems.base.ems_elide(), which elides “de” in Catalan (“d’Anna”).
Since the 2026-11-04 review the portal is for students and families only: a staff member applies to
a staff call, follows their application and prepares their mobility in the Erasmus+ app, under My
participation (views/erasmus/staff/views.xml, models/erasmus/staff_backend.py,
models/erasmus/staff_wizards.py):
| Menu | Action | Model and domain |
|---|---|---|
| Staff calls | action_erasmus_staff_calls |
ems.erasmus.call, staff_mine (non-stored, searchable: the staff calls the user can apply to or has applied to) |
| My applications | action_erasmus_my_applications |
ems.erasmus.application, the user’s own staff applications |
| My mobilities | action_erasmus_my_mobilities |
ems.erasmus.mobility, the user’s own staff mobilities |
create/edit/delete="false";
teachers (ems.group_teacher) get read access on the call, application, document, resolution and
its lines, offer, claim, mobility and self-assessment models, narrowed by *_staff_own record
rules to their own records (security/rules/erasmus.xml). Every change is an entry of the
Actions dropdown or a line button (Hand in, Sign it here, PDF) that checks the record is
the user’s own (_ems_staff_check()) and then calls, as superuser, the same _ems_portal_*
methods the portal uses, mostly through a wizard (ems.erasmus.staff.*.wizard). So the rules of
the process (deadlines, required fields, who may act) live in one place for both channels.staff_own, staff_editable, staff_can_submit, staff_claimable,
staff_can_propose, staff_self_assessment_open, …; non-stored, @api.depends_context('uid'))
drive the invisible= of each action; staff_next_step/staff_next_deadline show the portal’s
“what to do now” (_ems_portal_progress()), which for an application still in draft that can be
changed says where to write: Actions > Fill in the form.staff_answered (any of
ANSWER_FIELDS['staff'] filled in) hides the Form tab until something is answered, and
action_staff_apply() (the call’s Apply / Open my application) opens the form’s dialog
straight away while the application can be changed and nothing is answered yet. That dialog
carries open_application, so saving it opens the application instead of refreshing the call
behind it. The entry stays in the Actions dropdown, as every form action does.get_formview_id() opens the staff form for the user’s own application or
mobility (a task, a link, a mention), and for a staff call the user can apply to (the notice in
their daily summary); the team’s management form for everyone else./my/erasmus and /my/erasmus/call/<id> redirect an internal user to Staff
calls (controllers/portal_erasmus.py, _staff_redirect); the user menu’s Erasmus+ entry
(static/src/js/backend/user_menu_erasmus.js) opens the same action, shown when session_info’s
ems_erasmus_portal (models/erasmus/ir_http.py) is true.ems.erasmus.mail.link (abstract, inherited by the call, application, claim,
offer, resolution line and mobility) gives the mail templates _ems_mail_place() (“on the school
portal” / “in EMS”) and _ems_mail_url() (the portal page for a student, the record in the staff
action for a staff member), so one template serves both audiences.check_applicant_action() in ems.erasmus.mobility.action_sign_commitment, from the portal or
the staff wizard); a group mobility’s participants sign theirs from the portal.models/erasmus/workflow.py holds what every Erasmus+ model applies on top of the table above:
readonly=True (stored, not
computed nor related) plus state is written only by EMS’s own actions, which check who may act
and then write it as superuser: check_workflow_write() in write() and check_workflow_create()
in create() (a new record may only carry the field’s default, which a form sends for its status
bar) refuse any other write with AccessError. Applied to the call, application, resolution,
claim, interview and plan rating, mobility (its state, destination, decision on a proposal and the
commitment letter’s signatures), group mobility and participant; the payment and the invoice keep
_check_transfer_fields(). readonly=True alone only hid the field in the views: an RPC write
accepted it from anyone with write access on the model.ems_erasmus_state,
ems_erasmus_payment_state and ems_erasmus_publish in the context, which a client sends with any
call_kw (odoo/service/model.py passes the context through as is). Only env.su passes now, so
every internal write that needs it goes through sudo() after its own check (e.g.
EmsErasmusCall._ems_check_manager(), EmsErasmusClaim._ems_check_manager()).check_kept(), also as superuser, except while uninstalling): a
document line with a file or valid; an application, mobility, participant or group mobility that
holds one, a signature, an earlier version of the letter, a self-assessment, a payment, an
enrolment, a draw or a follow-up entry; a submitted interview or plan rating. A database cascade
from a parent would skip the children’s guards, so the parent checks them. A record without any
of it can still be deleted (one created by mistake).models/erasmus/attachment.py): an ir.attachment of a valid
line, of a closed record or a paid transfer’s receipt cannot be deleted, nor its content, type or
owner (res_model/res_id/res_field) changed. Its name and description can.groups= the Erasmus team
and the administrator, as D (fewer opportunities) already was, so D cannot be worked out from the
total; the total, the rank and the published lists are unchanged. What the applicant declares
about fewer opportunities (fewer_opportunities) is the team’s too; the conduct warnings and the
exclusion reason stay visible. Accepted as it is (decided 2026-10-29): the inputs of the criteria
shown in the Scoring tab (record average, interview marks, language level checked, first
mobility, conduct warnings) are still visible, so D could still be worked out by hand from them.
The Director inherits the Head of Studies’ rights and sees the same._read_format() (every read: read, search_read, the web client) returns 0 for plan_score, score_total and the
six staff criteria (PANEL_PENDING_HIDDEN) of a staff application whose call still has a ranked
application without plan_complete. The Head of Studies and the Director sit in the panel, and
would otherwise see the other members’ running mean before rating. The rank is 0 until then
anyway. Only reading is covered: server code and a domain or order on those stored fields still
use the real values.perm_write, perm_create,
perm_unlink False): rules add up across a user’s groups, so a write-all rule plus the group
teacher’s write access let a Head of Studies who teaches in a group mobility change any
individual record’s documents.Art. 12 of the call: up to 100 points, 50 to be eligible (ems.erasmus.call.min_score).
| Criterion | Field(s) on the application | Who / how | |
|---|---|---|---|
| A | Record average x 4 (max 40) | grade_average, grade_line_ids |
Computed by EMS at closing (below). Never typed by hand. |
| B | Interview: general (max 20) + English (max 15) | interview_general, interview_english |
Mean of the submitted interviews (below). |
| C | Language certificate (B1 2.5, B2 5, C1 7.5, C2 10) | language_level |
Erasmus team. |
| D | Fewer opportunities (10 or 0) | fewer_opportunities_check |
Erasmus team only (confidential). |
| E | First mobility (5 or 0) | first_mobility |
Erasmus team. |
| F | -3 per conduct warning, max -9 | strike_ids, strike_count |
Frozen at closing (below). |
score_total = A + B + C + D + E + F, with no floor at zero. Every manual criterion starts empty
(pending) and stores who set it and when (<field>_user_id, <field>_date, stamped by
write()). A pending criterion is never zero: score_complete stays false and the
application is left out of the ranking.
Close applications (ems.erasmus.call.action_close) freezes, for every application that was
submitted (states submitted, corrections requested, admitted, excluded), the data the
score is based on (_ems_freeze_scoring_data, sets scoring_frozen_date). Later changes in
grades or warnings never change it.
Record average (A) - _ems_grade_lines(), every module of the applicant’s current cycle
(the study of their main group), every year of it:
ems.student.year_record, not
provisional; previous-centre records included). The final grade when there is one; otherwise
the internal grade if some outcome was evaluated (or it was overridden).ems.grade_subject_line, last round per module) of the
study’s modules: the computed grade when every weighted part is in, otherwise the provisional
internal grade from the outcomes evaluated so far (_internal_from_outcomes: RA-weighted, whole
number, 4 at most with a failed RA). A module with nothing evaluated is left out.ems.subject.total_hours), two decimals. The modules used are
copied to grade_line_ids (ems.erasmus.application.grade: module, course, grade, hours).There is no manual average (decided 2026-10-22: no certificate of previous studies): a student
new to the centre is scored with this course’s provisional grades. With no evaluated module at all,
A stays pending (score_a_pending) and the application has no complete score.
Conduct warnings (F) - the applicant’s ems.strike records up to date_close whose group
belongs to the same study (group_id.study_id), copied to strike_ids/strike_count. EMS only
holds warnings since the course it started recording them.
Per modality, among admitted applications (rank, stored, recomputed when any application of
the call changes). The ranking of a modality is only computed when every admitted
application in it has a complete score; until then every rank in it is 0. Order: total, then the
tie-breaks of art. 12 - fewer opportunities, first mobility, English part of the interview,
record average - and finally the draw (draw_order, lower first). Applications still
tied after all of it share the rank and get needs_draw (the call’s needs_draw says some has it).
A tied set keeps needing a draw until each of its applications has its own drawn position: when a
correction (a claim upheld) ties someone with a set already drawn, the newcomer’s draw_order 0
would otherwise put them first with no draw, so the whole set is flagged again.
is_eligible: complete and total at least min_score.
Draw (audit D-13): draw_order is read only; the Erasmus coordinator (or the administrator)
runs Actions > Draw the ties on the call (action_draw_ties): before the provisional resolution,
which needs every tie drawn, and again whenever a correction ties someone (also after the definitive
resolution, before a rectification; otherwise a tie created by a correction could never be
published). EMS orders each tied set (per modality; a staff call’s, of the whole list; every member, those drawn before included) at random with
secrets.SystemRandom, writes draw_order and keeps the draw as an immutable
ems.erasmus.group.draw (the same model as the group mobilities’, with call_id instead of
group_mobility_id and score_total as what they were tied on; its lines point at the
application_id), listed in the call’s Resolutions tab and summed up in its chatter
(EmsErasmusGroupDraw._ems_run, shared with the group mobilities). The teachers of a group
mobility only read the group draws (rule_erasmus_draw_group_teacher).
erDiagram
ems_erasmus_application ||--o{ ems_erasmus_interview : "interview_ids"
ems_erasmus_interview }o--|| res_users : "evaluator_id"
ems_erasmus_application ||--o{ ems_erasmus_application_grade : "grade_line_ids (frozen)"
ems_erasmus_application }o--o{ ems_strike : "strike_ids (frozen)"
ems.erasmus.interview and the staff’s ems.erasmus.plan_rating (phase 4) share the evaluator’s
workflow through the abstract model ems.erasmus.evaluation (models/erasmus/evaluation.py):
evaluator, state, submit, reopen, lock at the review deadline or the provisional resolution, the
evaluator’s activity, the evaluator group membership (ems.group_erasmus_evaluator for an
interview, ems.group_erasmus_panel for a plan rating) and the write guard (an evaluator
writes only the rubric _ems_criteria and their notes). Each model only adds its rubric.
The Erasmus team sets the interview’s date and place on the application (interview_date,
interview_place) and assigns two evaluators (ems.erasmus.interview, one per evaluator, any
internal user). Send interview call emails the applicant the date and place
(email_template_erasmus_interview_call), at least 24 hours ahead (art. 11).
Each evaluator scores annex 4’s rubric, 0-5 per criterion, all required to submit:
| Part | Criteria | Field |
|---|---|---|
| General (max 20) | motivation, maturity and autonomy, handling difficulties, adaptation and communication | general_score |
| English (max 15) | comprehension, fluency and interaction, accuracy, vocabulary and pronunciation | english_score |
stateDiagram-v2
[*] --> draft: assigned (activity for the evaluator)
draft --> submitted: Submit (every criterion scored)
submitted --> draft: Reopen (evaluator until the call's interview_deadline; team any time)
evaluator_id = user), never the
other evaluator’s, nor anything else of the application. Being assigned adds them to
ems.group_erasmus_evaluator (Erasmus+ > My participation > Interviews to score); losing every interview removes it.
The panel’s plan ratings use ems.group_erasmus_panel the same way (Plans to rate).interview_deadline (label Interview/evaluation deadline, shared with the plan ratings) the evaluator can no longer change or reopen; the team
can still reopen, writing a rectification note (rectification_note), posted in the chatter.single_interview_reason, annex 4).| Erasmus team | Head of Studies / Director | Evaluator | |
|---|---|---|---|
| Criteria C, E, draw | W | R | - |
| Criterion D | W | - | - |
ems.erasmus.interview |
rwcu | - | rw own (rubric, notes), no create/unlink |
ems.erasmus.application.grade |
r | r | - |
erDiagram
ems_erasmus_call ||--o{ ems_erasmus_resolution : "resolution_ids"
ems_erasmus_resolution ||--o{ ems_erasmus_resolution_line : "line_ids (frozen)"
ems_erasmus_resolution_line }o--|| ems_erasmus_application : "application_id"
ems_erasmus_application ||--o{ ems_erasmus_offer : "offer_ids"
ems_erasmus_application ||--o{ ems_erasmus_claim : "claim_ids"
ems_erasmus_claim }o--o| ems_erasmus_resolution : "resolution_id (against)"
| Model | Purpose |
|---|---|
ems.erasmus.resolution |
A list the Erasmus team prepares and the Erasmus coordinator approves by publishing it: admission, provisional, definitive or rectification. |
ems.erasmus.resolution.line |
One applicant in it, frozen when the resolution was prepared: modality, rank, every criterion, total, result, masked identity document. Described as “Erasmus+ result” and named “ |
ems.erasmus.offer |
A place offered to an applicant and their answer. |
ems.erasmus.offer.wizard |
Offer a free place to the next reserve (transient). |
ems.erasmus.claim |
A claim (after the provisional) or an appeal before the Head of Studies (after the definitive). |
New fields on the call: claims_deadline (shown to applicants with the provisional result) and
acceptance_deadline (the deadline of the offers made when the definitive resolution is
published). New application states: selected, reserve, not_selected, accepted,
renounced; the ranking (_compute_rank) counts every one of them as admitted
(RANKED_STATES), so publishing results never changes a rank.
stateDiagram-v2
[*] --> draft
draft --> draft: Prepare lines (freezes them, repeatable)
draft --> published: Publish (Commission approval recorded)
published --> [*]
Order, each one needing the previous one published (PREVIOUS_KIND): admission, provisional,
definitive, then any number of rectifications. Admission, provisional and definitive are published
once per call (SINGLE_KINDS).
Preparing (action_prepare, checked again on publishing) needs the call closed, every
application admitted or excluded, and - except for the admission list - every admitted one with a
complete score and no pending draw (A missing value blocks, never zero). It also needs every
applicant’s identity document (document_id, or passport_id). The lines copy, for the admission
list, the admitted and the excluded; for the others, also every result (RANKED_STATES), with the
rank, the criteria and the result. The definitive resolution also waits for the claims (art. 14):
it is refused while the call’s claims_deadline has not passed or any claim of the call is still
open.
| Result | Rule (_ems_ranking_result) |
|---|---|
excluded |
The application is excluded; the reason goes on the line, only for the applicant. |
not_selected |
Not eligible: below the call’s minimum score. |
selected |
Eligible and rank within the modality’s places. |
reserve |
Eligible, after the places. |
Publishing is the coordinator’s approval (ems.group_erasmus_coordinator or
ems.group_academic_admin, checked in action_publish(); who and when are published_by_id and
publish_date, shown on the list as the approval date). It needs the lines, notes for a
rectification and, for a definitive resolution or a rectification, a future acceptance_deadline.
Then:
write()/unlink() refuse it; the lines have
no write access at all). A correction is a new rectification.email_template_erasmus_resolution_published,
rendered per line): the reason if excluded, the rank and total otherwise, the claims deadline
with the provisional, the acceptance deadline if selected, and with a definitive resolution or a
rectification how to appeal it (ems.erasmus.resolution._ems_appeal_notice(), also shown on the
portal next to that list and in the group mobilities’ result email). Replies go to whoever
published it. A student offered a place by the list gets it with a copy to their family when EMS
keeps it informed (_ems_mail(..., family_copy=True): email_cc with the family of
_ems_informed_recipients(): a minor’s, or an adult’s who authorized sharing).ems.erasmus.interview.is_locked),
as the review deadline does: after it, only a team rectification reopens one.accepted, renounced), which a rectification never
undoes - and creates an offer for every selected one without an offer waiting or accepted, with
the call’s acceptance_deadline. No separate offer email: the result email already asks them to
answer. The selected’s result email, a free place’s offer email and the portal’s offer card list
the modality’s destinations with their places (ems.erasmus.call.modality._ems_offer_destinations(),
ems.erasmus.destination._ems_offer_label()), plus the position on the portal: the destination is
chosen later by turns, so the student knows what they may get before accepting. A rectification withdraws (cancelled, noted in the chatter) the offers still waiting of
whom it no longer selects: the offer they got as selected, or any offer once below the minimum
score; a reserve keeps an offer made for a free place. Whoever already accepted or renounced gets
the list with “you keep the place you accepted” / “you renounced earlier” instead of the result
line, since their state does not change (or “you did not answer the offer in time”, from
ems.erasmus.application._ems_offer_expired())._ems_places_overflow() counts them per
modality (a staff call: the whole pool) on the draft; places_warning shows it on the form and
_ems_check_can_publish refuses to publish until the team decides (e.g. adds a place to the
modality).Published lists never show names. The portal list (/my/erasmus/call/<id>/resolution/<id>)
and the PDF for the centre’s website (ems.action_report_erasmus_resolution, printed from the
resolution form’s Actions > Print the published list (action_print, this record only) and from
the list’s Print menu (bound to the list only, issue #786), same template
ems.erasmus_resolution_list) show, per modality, the rank, the masked identity document
(public_id), the total and the result. mask_document_id() follows the Spanish data protection
agency’s guidance for additional provision 7 of Organic Law 3/2018: DNI ***4567**, NIE
****4567*, any other document its 4th to 7th characters.
stateDiagram-v2
[*] --> pending: definitive published (selected) / wizard (reserve)
pending --> accepted: applicant accepts on the portal
pending --> renounced: applicant renounces on the portal
pending --> expired: deadline passed (cron)
pending --> cancelled: team withdraws it
The form’s status bar shows Waiting for an answer, Place accepted, Renounced and No answer (issue #785); a withdrawn offer shows its state only when it is the current one.
POST /my/erasmus/call/<id>/offer, answer=accept|renounce,
optional reason), before the deadline, which _ems_answer checks with the centre’s clock. The
application moves to accepted or renounced.ems.ir_cron_erasmus_expire_offers
(_cron_expire_offers) marks the offer expired and the application renounced. The portal and
the rectification email tell it apart from a renunciation in writing (_ems_offer_expired()).email_template_erasmus_offer_answer, one template branching on the offer’s state; _ems_send_answer),
and so is a place offered to a reserve (email_template_erasmus_offer), both with a copy to the
family of a minor or of an adult who authorized sharing. The family gets no copy of the other lists nor of the claims._ems_notify_tutor): an ems.info_notice on the
student for their next daily summary, a notice and not a to-do, like the convalidations’ notice
to the teaching staff.places_accepted out of places_total (its modalities’ places) and
offers_pending (non-stored, _compute_offers): the Places accepted button and a notice on
the call form, so the team knows when to open the destination choice. A reserve’s result email
gives their number (_ems_reserve_number); an admitted or excluded applicant’s does not point to
a score they do not have.free_places (places minus
the offers waiting or accepted) and next_reserve_id (the best-ranked reserve application
without one). The team clicks Actions > Offer a free place on the call; the wizard shows that
proposal and a deadline, by default as long as the definitive offers had (from the definitive
resolution’s publication to acceptance_deadline) or three days (_ems_answer_deadline); confirming creates the offer (from_reserve) and emails it
(email_template_erasmus_offer).ems.erasmus.call._ems_sync_free_place_tasks(): while
a modality (a staff call: the pool) has a free place and a reserve to offer it to, each member
of the Erasmus team has a to-do on the call (ems.mail_activity_erasmus_free_place, one each,
never duplicated). It is marked done once no such place is left, e.g. when the wizard offers it.
No reserve left means no task.cancelled): the place becomes free again.A log (art. 14): application, the published resolution it is against, kind (claim, appeal before
the Head of Studies), received date, text, files, response. The applicant sends a claim from the
portal while the newest published provisional resolution is claimable
(ems.erasmus.application._ems_portal_claimable: before the call’s claims deadline);
_ems_portal_claim creates it with its files and gives every member of the Erasmus team a to-do
(ems.erasmus.claim._ems_ask_answer). A claim or an appeal that arrives by email is recorded by the
team. Creating one emails the applicant a receipt with the moment it arrived
(email_template_erasmus_claim_received); Resolve needs the response and the outcome
(Upheld, Partially upheld, Dismissed, issue #792), stamps the date, closes the to-dos and
emails both (email_template_erasmus_claim_resolved); the portal shows the outcome under the claim.
Whoever answers an appeal writes only response and outcome (ANSWER_FIELDS). Upholding a claim
means correcting the application’s data and publishing the next resolution (the definitive, or a
rectification).
Appeals follow the hierarchy, not the role. An appeal is answered by
_ems_appeal_approvers(): the Head or Deputy Head of Studies found by
hr.employee.find_head_of_studies() from the student’s group tutor (main_group_id.tutor_id), or
from the teacher themself in a staff call; the Director when the applicant is that Head of Studies
or none is found; the administrators when the applicant is the Director. Creating an appeal (or
changing a claim’s kind to appeal) gives them the to-do instead of the team. can_resolve
(non-stored, depends_context('uid')) shows Resolve/Reopen and makes the response editable,
and _ems_check_can_resolve() re-checks it server-side: the team answers the claims, the resolved
approvers the appeals, the administrator any of them. ems.group_head_of_studies has write access
on the model only for that: write() lets anyone outside the team change nothing but response,
and only where can_resolve holds (another Head of Studies cannot). can_edit makes the rest of the
form read-only for them.
Actions > Export to spreadsheet (the applications list, and the Actions dropdown of an
accepted application and of the call once its definitive resolution is published) downloads an
.xlsx with one row per applicant who accepted a place. An external tool imports it as is, so
the sheet (Participantes) and the headers are fixed Spanish strings, in this order, never
translated (PARTICIPANT_HEADERS):
| Column | Source |
|---|---|
| Nombre, Apellidos | firstname, lastname |
| DNI | document_id, else passport_id |
| Email, Teléfono, Dirección | personal email, phone (else mobile), the postal address on one line |
| Fecha de nacimiento | birth_date, as a real date cell (dd/mm/yyyy) |
| Nacionalidad | citizenship_id |
| Género | always empty: EMS keeps no gender for students |
| Ciclo formativo, Curso | the main group’s study acronym and year (1 or 2) |
| Titular de la cuenta, Banco, BIC, IBAN | the first res.partner.bank (holder, else the student’s name), IBAN without spaces |
| Tutor legal, Email del tutor legal, Teléfono del tutor legal | only for minors: every family contact (_ems_family_contacts()), joined with “, “ in the same order in the three columns |
It carries personal and bank data: the file is built on the fly by /ems/erasmus/participants
(controllers/erasmus_export.py) and never stored, and only ems.group_erasmus can get it
(_ems_participants() refuses anyone else; the server action has that group only). Each download
is logged (audit D-10, ems.erasmus.export._ems_log_spreadsheet): an export line with
scope = participants, the call (or group mobility), who, when and how many people, and a message
in the call’s (or group mobility’s) chatter. Who can download it does not change.
| Route | What |
|---|---|
GET /my/erasmus/call/<id> |
Adds the place offer (accept / renounce) and a Results card: one entry per published resolution, with the applicant’s own result, rank, total and every criterion. |
GET /my/erasmus/call/<id>/resolution/<id> |
The published list, without names. Only for applicants of that call, only published resolutions. |
GET /my/erasmus/call/<id>/resolution/<id>/pdf |
The same list as a PDF. |
POST /my/erasmus/call/<id>/offer |
Answer the logged-in user’s own pending offer of that call. |
POST /my/erasmus/call/<id>/claim |
The logged-in applicant’s claim against the provisional resolution (text and claim_files). |
The list page passes my_partner, so the shared list template (ems.erasmus_resolution_list)
highlights the applicant’s own row; the PDF has no my_partner and highlights nothing. A reserve’s
result says their place on the reserve list of the modality
(ems.erasmus.resolution.line._ems_reserve_number), and while the application is Admitted the
top badge shows the newest provisional result. A student’s image_consent is not a form answer: it
is copied from their image rights authorisation of the course (res.partner.auth_image) on every
save.
| Model | Erasmus team | Head of Studies / Director | Portal |
|---|---|---|---|
ems.erasmus.resolution |
rwcu (published: read only); publishing: coordinator only | r | via controller (sudo), published only |
ems.erasmus.resolution.line |
r (written by Prepare lines only); criterion D hidden from others | r | own lines and the list |
ems.erasmus.offer |
r + Withdraw offer; created by publishing and the wizard | r | answers their own |
ems.erasmus.claim |
rwcu | r | - |
Menus Erasmus+ > Calls > Resolutions, Place offers and Claims: team, Head of Studies, Director.
A call’s audience (Applicants) is student or staff; it cannot change once the call has
applications. The engine is the same (call, application, documents, resolutions, offers, claims);
what differs:
| Students | Staff | |
|---|---|---|
| Who sees the call on the portal | A student whose main group’s level is in a modality | An internal user with an employee file (res.partner._ems_erasmus_employee) |
| Modality | Computed from the level when applying; required to publish | Not needed to publish (the places may change), but publishing without places warns the team (action_publish() returns a notification); required before preparing the provisional resolution; the team assigns each selected person’s project and period |
| Documents | Configured per call; a new call brings the five of art. 8 (_ems_student_documents, on create) |
Only the optional language certificates (_ems_staff_documents, on create and on the audience onchange); the plan is written in the form (PLAN_FIELDS) |
| Admission checks | Requirements; a serious conduct record this course is pointed out, the team may exclude | Requirements only |
| Scoring | Art. 12 (A-F), A and F frozen at closing | Art. 11 of the staff call (1-5): the panel, what the applicant declares (last mobility, seniority, language) and the merits the team records |
| Ranking | Per modality | One list for the whole call |
| Places | Per modality | Issue #772: project_place_ids (places per project, the team’s planning), offered as one pool (_ems_places(), the sum); staff only see the total |
| Modalities | Levels and places; the project from the levels | None. The team sets the mobility’s project_id (domain allowed_project_ids: the projects of the call’s table; _check_project refuses another), which brings the documents of its kind (project_kind = the project’s kind; write re-syncs the requirements). project_places (“2026-VET: 1 of 2 places left”) and project_places_over (a warning, not a block) on the mobility; places_without_project warns on the call (note 7.1) and the application list shows project_id from a staff call’s button (ems_staff_call context) |
| Dissemination | - | Not part of the plan nor of the rubric: the same obligation for everyone, a news item on the website and sharing it at a meeting if needed (two return steps of the checklist) |
| Identity document of the lists | res.partner.document_id / passport_id |
hr.employee.identification_id / passport_id (_ems_identity_document) |
| Minimum score | 50 | 0 (set by create() and the onchange of audience; hidden in the form) |
Interview/evaluation deadline (interview_deadline) |
From date_close (_ems_deadlines()), like every deadline |
The same rule: it is the panel’s deadline |
erDiagram
ems_erasmus_call ||--o{ ems_erasmus_call_panel : "panel_ids"
ems_erasmus_call_panel }o--|| res_users : "user_id"
ems_erasmus_application }o--o| hr_employee : "employee_id"
ems_erasmus_application ||--o{ ems_erasmus_plan_rating : "plan_rating_ids"
ems_erasmus_plan_rating }o--|| res_users : "panel_member_id"
ems_erasmus_plan_rating }o--o| res_users : "evaluator_id (the member, empty if abstaining)"
ems_erasmus_application ||--o{ ems_erasmus_application_merit : "merit_ids"
| Model | Purpose |
|---|---|
ems.erasmus.call.panel |
A panel member of a staff call (user, post), copied when the call is duplicated. |
ems.erasmus.plan_rating |
One panel member’s rating of one application’s mobility plan (annex 2, criterion 1 “Mobility plan”: concreteness and relevance (to the job), each 1 / 0.5 / 0 points, and, since 2026-11-18, activity_kind, the activity of proposal A, 0.5 for a job shadowing or a teaching assignment and 0 for a course, so that the centre favours them over courses (adriamt); max 2.5. Their selection labels are the annex’s descriptions, their keys the points). The panel reads it from proposal A’s text: the application stores no activity type, which is only chosen on the mobility after accepting the place, and nothing checks it against that later choice (adriamt, 2026-11-18: only the application counts). The old transfer aspect was removed with no migration: the selection keys are the same, and no staff call had reached the panel in production. Unique per (application, panel member). Inherits ems.erasmus.evaluation. |
ems.erasmus.application.merit |
A merit of criterion 3 (centre project: collaboration 0.5, coordination 1), with its justification. |
The staff form (ems.erasmus.staff.application.wizard, over ANSWER_FIELDS['staff'], the same
in the backend dialog and the portal) has three short blocks (adriamt, 2026-11-03 and 2026-11-13):
(1) the mobility plan (annex 1), explained in one line and made of two proposals in the teacher’s
own words, both required, proposal_a (the main one) and proposal_b (in case A can’t be done),
each saying the activity, host, where, when and what they want to learn, with the annex’s examples
as placeholders; how it will be applied is not asked (the separate plan_text went on 2026-11-13,
with no migration: the 2026-27 staff call was not published in production, and Odoo keeps the
orphan column). PLAN_FIELDS lists both, required to submit, and the rating shows them through
related fields, so the panel reads them on screen and nothing else of the application, and gives
one score; (2) “I have not done any Erasmus+ mobility at the Institut Puig Castellar”
(declared_never_staff_mobility, help FIRST_MOBILITY_HELP: as staff, accompanying groups and
other programmes don’t count; otherwise the team sets last_staff_mobility, criterion 2), the
date at the centre (required, criterion 5), the language certificate and the centre projects (help
CENTRE_PROJECTS_HELP, criterion 3); (3) optional and folded: support needs, image consent,
notes. The application’s button says Fill in the form while it is a draft and Modify the
application once submitted and still changeable (P05, P08). The mobility’s proposal starts with both
proposals in its notes and the country named in A (_ems_create_for, _ems_country_in); the
participant writes the exact entity and dates there and the Direction validates them as any
proposal. A staff call asks for no CV and no identity document at application time
(_ems_staff_documents: only the optional language certificates, so publishing a staff call needs
no required document); the identity document is a staff preparation document. Support needs
(confidential: groups Erasmus team and administrator), the declared language certificate
(declared_language_level), image consent, notes. The controller saves only the answers of the call’s audience;
_ems_portal_save refuses an activity outside the selection. employee_id is set when the
application is created. is_minor is always false for staff.
Who sees a staff call (art. 6, ems.erasmus.call._ems_staff_can_apply, used by
res.partner._ems_erasmus_calls, so by the portal card and by _ems_portal_get_or_create): an
internal user whose employee is a teacher with an active ems.teaching in a group of one of the
call’s staff_level_ids (Teachers of; a new staff call gets every FP level of the catalog,
STAFF_LEVELS: CFGB, CFGM, CFGS, EFPS, PFI; required to publish), and the call’s
validator_ids (Validates the activities, required to publish). Never the administration staff
(asp) nor a teacher of ESO/BTX only. A new staff call fills validator_ids with
_ems_staff_validators(): the Director (res.company.director_id) and the Head of Studies that
find_head_of_studies() returns for most of the teachers of those levels (decided with the
coordinator 2026-10-23: FP’s validates every applicant, also the language teachers who hang below
ESO/BTX’s in the chart). The staff screens never show the project nor its places (the team’s
planning): not in the application header, the offer nor the offer email.
Projects’ short name (issue #772). ems.erasmus.project.code (Short name, e.g. 2026-VET) is a
stored compute from the agreement number (AGREEMENT_NUMBER: its year and VET/HED), editable; it is
the display_name (the agreement number with its kind when there is none) and _rec_names_search
covers both. The upgrade (migrations/18.0.0.48.0/post-migrate.py, to fold into the release
version) turns each staff modality’s places into a line of the project its mobilities already use, or
the only active project of its kind, fills that project on its mobilities without one, posts a note on
the call when it can’t resolve it, and deletes the staff modalities (references nulled first).
Actions > Send plans to the panel (action_send_to_panel, staff call in its Scoring phase:
closed and before the provisional resolution, which freezes the scores; issue #786) creates one
rating per admitted application and panel member still without one, so it can be repeated after
admitting more. It needs the call’s interview_deadline: each evaluator’s to-do is due that day
in the company’s timezone (_ems_activity_date), and changing the deadline moves the open to-dos
of the interviews and plan ratings (_ems_move_evaluation_activities). The daily task digest
reminds the members of them. A panel member who applied to the call (_ems_candidate_partners: any application
past draft) gets an abstention instead: no evaluator_id, reason Candidate in this call (art. 10).
For any other conflict of interest the team writes the abstention_reason, which clears the
evaluator (write); clearing the reason gives the rating back to the member. There are no
substitutes (decided with the coordinator 2026-10-22): _check_evaluator only accepts the panel
member, or nobody, and never a candidate of the call.
plan_score is the mean of the submitted ratings that are not abstentions; plan_complete needs
every non-abstaining rating submitted and a rating for every panel member (call.panel_ids). A
pending rating leaves the score incomplete.
What a panel member sees: only their ratings (record rule evaluator_id = user), and, so they
can open the plan, the application document lines whose call document is panel_visible and not
confidential, of the applications they rate (record rule on ems.erasmus.application.document,
read only); the rating shows those files (plan_attachment_ids). Nothing else of the application.
| Criterion | Field(s) | Points | |
|---|---|---|---|
| 1 | Mobility plan | plan_score → score_plan |
max 2.5 |
| 2 | Last staff mobility | last_staff_mobility (team correction) else declared_last_staff_mobility → score_last_mobility |
never / older 1, two courses ago 0.5, recent 0 |
| 3 | Centre projects | merit_ids (project kinds) → score_projects |
sum, max 2 |
| 4 | Languages | language_level (checked by the team) else declared_language_level (the applicant’s) → score_staff_language |
B2 1.5, C1 2, C2 2.5 (B1 0) |
| 5 | Seniority | seniority (team correction) else declared_seniority → score_seniority |
< 1 year 0, 1-2 1, 2-5 1.5, ≥ 5 2 |
Declared values (_compute_declared_staff_bands): the applicant only ticks that they never had an
Erasmus+ staff mobility at the Puig (declared_never_staff_mobility → band never); for everyone
else the team sets last_staff_mobility from the centre’s records (the 2026-11-03 review). The month
they joined the centre (declared_centre_start_date) is required to submit; seniority counts whole
months up to the call’s closing date (company time). The portal sends it as an <input type="month">
value (YYYY-MM, stored as the 1st).
score_complete needs the plan complete, criteria 2 and 5 (declared or corrected) and
merits_checked (stamped like every manual criterion, so “no merits” is an explicit answer).
Criterion 4 never blocks: no declared certificate counts as none (_ems_staff_language_level).
Ranking (_compute_rank, _ems_rank_key): one list per call, once every admitted application
is complete. Tie-breaks (art. 11 of the staff call): plan score, then more seniority at the centre by
the month and year declared in the form (declared_centre_start_date, earlier first; within the same
criterion-5 band too), then the draw the coordinator runs (action_draw_ties). Result
(_ems_ranking_result): selected within the sum of every modality’s places, reserve after them.
STAFF_SCORE_FIELDS). The published list
(_ems_list_groups) is a single table for a staff call, still without names.free_places and
next_reserve_id live on the call (_ems_free_places, _ems_next_reserve), and the offer
wizard asks for no modality._ems_staff_participant_row) reads the employee file: name from the
user’s contact, identity document, private email (else work), private phone (else mobile),
private address, birthday, nationality (country_id) and bank_account_id. Género, Ciclo
formativo, Curso and the legal guardian columns stay empty.| Model | Erasmus team | Head of Studies / Director | Panel member (ems.group_erasmus_panel) |
|---|---|---|---|
ems.erasmus.call.panel |
rwcu | r | - |
ems.erasmus.plan_rating |
rwcu | - (unless in the panel) | rw own (rubric, notes) |
ems.erasmus.application.merit |
rwcu | r | - |
ems.erasmus.application.document |
rwcu | r, not confidential | r, panel_visible lines of the plans they rate |
The team opens the plan ratings from the call’s Plan ratings button; the panel, from Erasmus+ > My participation > Plans to rate.
Accepting a place offer (ems.erasmus.offer.action_accept) creates the participant’s mobility.
The application keeps the selection; the mobility holds everything after it.
erDiagram
ems_erasmus_call ||--o{ ems_erasmus_destination : "destination_ids (students)"
ems_erasmus_destination }o--|| ems_erasmus_call_modality : "modality_id"
ems_erasmus_call ||--o{ ems_erasmus_call_document : "preparation_document_ids (stage preparation / return)"
ems_erasmus_call ||--o{ ems_erasmus_call_task : "task_ids (checklist)"
ems_erasmus_application ||--o| ems_erasmus_mobility : "mobility_ids"
ems_erasmus_mobility }o--o| ems_erasmus_destination : "destination_id"
ems_erasmus_mobility }o--o| res_partner : "host_partner_id, host_contact_id"
ems_erasmus_mobility ||--o{ ems_erasmus_application_document : "document_ids"
ems_erasmus_mobility ||--o{ ems_erasmus_mobility_task : "task_ids"
| Model | Purpose |
|---|---|
ems.erasmus.destination |
A destination of a students’ call, in one modality: country, city, places, the levels it suits (empty: all), dates, host entities, notes. free_places = places minus its mobilities not cancelled. Not copied with the call (destinations change every year). |
ems.erasmus.mobility |
One per accepted application (unique(application_id)): destination, the proposal and its decision, country, city, host entity (a company contact) and its contact person, dates, documents and checklist. |
ems.erasmus.call.task |
A checklist step of the call (not a document): when (stage: before leaving / on return), only for some modalities. |
ems.erasmus.mobility.task |
That step for one mobility, ticked by the team (who and when stamped) or, for a staff mobility, by the teacher (see below). |
Documents. ems.erasmus.call.document has a stage: application (phases 1-4), preparation
or return. The call’s document_ids shows only the application ones (One2many domain), so the
application’s lines and every earlier rule are unchanged; preparation_document_ids holds the
other two. Each one (and each checklist step, ems.erasmus.call.task) can be limited to some
modalities (modality_ids) and to one project (project: KA121-VET or KA131-HED, matched against
the mobility’s modality, so a default can say “VET only” before the call has modalities), and says
who signs it outside EMS (sign_participant, sign_guardian for minors, sign_director,
sign_coordinator, sign_tutor: the centre’s tutor in sBID, sign_host; shown as signers). The mobility’s lines are ems.erasmus.application.document records with mobility_id
set: same review, every version kept, a new upload goes back to review. A new call gets default
documents and steps per audience (_ems_preparation_documents, _ems_preparation_tasks: art. 17
of the students’ call, art. 15 of the staff call), editable. _ems_sync_requirements() adds what
the mobility’s modality needs and is missing, never removing a line: on creation, when the
modality is changed on the application (application.write), when a staff member’s project is
assigned, and when the call is saved with changes to preparation_document_ids or task_ids
(issue #788: _ems_sync_open_requirements() on the call’s mobilities still going on; there is no
button to remember). A group mobility does the same when saved with changes to requirement_ids. Removing a call
document (ems.erasmus.call.document.unlink(), call or group mobility alike) removes its empty
lines everywhere; if any line is evidence (_ems_evidence(): a file, a team file or valid) it raises
a translated UserError naming the documents instead of the database’s ondelete='restrict' error,
so nothing handed in is ever deleted.
Filled in by EMS (issue #788): the mobility’s project_id, on creation and when the modality
changes, when exactly one project is possible (allowed_project_ids: a single active project of
the modality’s kind, or a single project among a staff call’s places; _ems_fill_project()); two
or more are left to the team. Choosing the host entity (on the mobility and in the agreed
destination’s dialog) copies its country and city when empty (host_place_vals()). Validating a
staff proposal copies country, city and dates but never looks up or creates the host entity: the
name the teacher types (proposal_host) is only a guide, and the team sets the real entity when
preparing the documents (decided by the Erasmus+ coordinator, 2026-11-13). A project’s kind
comes from its agreement number (-KA121-VET-/-KA131-HED-) like its code, and a support
rate’s band_scope from its action (KA131-HED: the whole project; KA121-VET: the same kind of
mobility); both stay editable.
New call fields: choice_turn_hours (default 72) and choice_open.
Deadlines, per document: due_basis (destination: after the destination is set,
before_start: before leaving, after_end: after returning) and due_days; each line computes its
deadline from the mobility’s destination_date (stamped when it moves to preparing,
_ems_set_state), date_start or date_end. Handled by (handled_by): participant (they
upload it), team_to_sign (the team attaches the filled-in document to the line’s
prepared_attachment_ids; the participant downloads it, signs it and uploads it signed, and is not
asked for it until then) or team (the team provides it, e.g. the insurance policy: the participant
only downloads it, can’t upload to it, is never reminded of it, and the line counts as complete once
prepared_attachment_ids has a file). Defaults (art. 17 and annex 1): students, the European Health
Insurance Card and, for minors, the family’s and the Mossos d’Esquadra’s authorisations (30 days
after the destination), the OLS certificate with the English level (30 days after the destination),
the inclusion documentation (optional, confidential), the grant agreement and the learning agreement
(team_to_sign, 30 days before leaving at the latest, ideally 90), the insurance policy (team, 30
days before leaving), the sBID agreement (REF5) and activity plan (REF6) (team, requirement
curricular) and, on return, the certificate of stay (team_to_sign, signed by the tutor at the host
company, 30 days after returning), the Europass mobility document (team, KA121-VET, issued after the
mobility with the learning outcomes and actual dates) and the recognition of ECTS credits (team,
KA131-HED, requirement curricular). Staff: health card, grant agreement, insurance policy, learning
agreement (KA121-VET) or mobility agreement (KA131-HED), on return the Europass mobility document
(KA121-VET, plus an optional certificate of stay or attendance for when the dates or the activity need
proving) or the certificate of stay or attendance (KA131-HED), and the report with evidence.
Conditional requirements. A call document’s requirement is required, optional, minor
(the application’s is_minor), curricular: required only when the mobility’s placement_type
is curricular (a work placement managed in sBID, the default for a student, computed once and then
editable by the team; extracurricular and graduate leave it optional), or short_blended:
required only when the mobility is_short_blended, and hidden on the portal otherwise (the student’s
virtual component, a PDF with their preparation, KA131-HED, in the record’s category 02).
Opening date. A call document’s open_days (mobility documents before leaving) keeps it closed
until that many days before leaving: the line’s open_date is date_start - open_days, and
_ems_is_open() is false before that day or while the dates are unknown. A closed line shows on the
portal with the day it opens and no upload input; _ems_portal_upload ignores it and
_ems_documents_to_correct (the weekly reminder) leaves it out. It still counts for
preparation_complete. The virtual component opens 30 days before leaving and is due the day before
(due_basis='before_start', due_days=1). A checklist step
(ems.erasmus.call.task) has its own requirement: required or short_blended, which only counts
when the mobility is_short_blended (KA131-HED modality and a stay of SHORT_BLENDED_MAX_DAYS, 30,
days or fewer). The mobility line computes is_required; _compute_complete and the portal’s steps
only take the required ones, and a document that is not required can still be attached. Signers by default: the Director signs the
grant agreement and the sBID agreement; the Erasmus coordinator, the learning agreement and the
Europass mobility document; the family of a minor, the grant agreement and the learning agreement
too; the centre’s tutor, the sBID activity plan. Not asked for, EMS
already has them: identity document, bank account, personal details, emergency contact.
Commitment letter (annex 3): the call’s commitment_text (HTML, filled in with
_ems_commitment_text() on a new students’ call, translatable): the commitments, the terms the
centre’s former paper “assumpció de responsabilitat” carried (the centre’s responsibility is limited to
the agreed programme; a serious breach means being sent back, at the participant’s or family’s cost),
and a note that a minor’s family authorises taking part by accepting it, so applying needs no family
authorisation. The participant accepts and signs it
on the portal (action_sign_commitment, portal step commitment): EMS keeps a copy of the text
(commitment_signed_text), who (commitment_signed_by_id), when and the IP address; the forms
say it in one line (commitment_status, commitment_guardian_status, issue #784).
commitment_pending (text on the call, not signed yet) blocks preparation_complete and is part of
the weekly reminder. A minor student’s family signs it too (commitment_guardian_* fields,
action_sign_commitment(guardian=True)), in either order and over the same text: the first signature
stamps commitment_signed_text and the second signs that copy (_ems_commitment_text()).
commitment_guardian_pending (students’ call, partner not adult, not signed by the family) also
blocks preparation_complete. The family signs on /my/erasmus (route
/my/erasmus/commitment/<mobility_id>), which lists res.partner._ems_erasmus_guardian_mobilities():
the mobilities in preparation of the minors it acts for (_ems_portal_can_act_for); that also makes
the portal’s Erasmus+ card visible to it. _ems_remind_guardians() emails every family contact with
an address (template email_template_erasmus_commitment_guardian) when the mobility moves to
preparing and in the weekly reminder cron.
Weekly self-assessment during the stay. The call’s self_assessment_question_ids
(ems.erasmus.call.question: name, kind text or rating 1-5; four on a new students’ call,
_ems_self_assessment_questions(), editable; none on a staff call, so staff get no self-assessment
unless the team adds questions). The stay is split into weeks from date_start
(_ems_self_assessment_weeks(): (week, first day, last day), the last one cut at date_end). While
the mobility is preparing (it stays so until the team closes it after the return), the portal
offers a form for every week already begun and not answered (_ems_self_assessments_open(), portal
step self_assessment, _ems_portal_self_assessment(week, answers): every question answered,
ratings 1-5, each week once, unique(mobility_id, week)). Each answer
(ems.erasmus.self_assessment.answer) keeps the question’s text as asked. The weekly reminder adds
the weeks already over and not answered (_ems_self_assessments_missing()). The team reads them on
the mobility (Self-assessment tab, self_assessment_progress “answered / weeks”), prints them
(report ems.action_report_erasmus_self_assessment, bound to the mobility) and the exports add that
PDF to the participant’s record, category 03_Durant_la_mobilitat (see records.md). Access: Erasmus team and administrator
read/write (the team can delete a week for the participant to answer it again), Head of Studies read.
Projects (ems.erasmus.project, menu Erasmus+ > Projects): the centre’s active projects
(agreement number, kind KA121-VET / KA131-HED, dates, active). Each mobility’s project_id must
be of its modality’s project kind (_check_project; the field’s domain offers only those).
stateDiagram-v2
[*] --> choosing: offer accepted
choosing --> preparing: destination chosen / one destination / proposal validated
choosing --> preparing: Set the agreed destination (team)
choosing --> cancelled: renounced / cancelled
preparing --> done: Close (return documents and steps complete)
preparing --> cancelled: renounced / cancelled by the team (with a reason)
Phase (issue #785). Preparing covered everything from the destination to the closing, so
the status bar, the lists, the kanban (grouped by it) and the portal show phase instead: the state,
except that a preparing mobility is in its Mobility stay from date_start (that day included) and on
Return home from the day after date_end (the same day stay_over turns true), in the company’s
timezone. It is stored so it can be grouped and filtered; the hourly cron
ems.ir_cron_erasmus_mobility_phase (_cron_update_phase) recomputes only the mobilities whose
dates have overtaken their phase (one indexed search, usually empty). Business rules keep reading
state. preparation_complete and return_complete are no longer shown (the phase says where the
mobility is); action_close still checks them.
The state changes only through the actions. Cancelling frees the place (_ems_cancel): the
accepted offer and the application become renounced; the place is then offered with the existing
wizard, never on its own.
static/src/js/backend/actions_dropdown.js). On the team’s mobility the conditions read phase: closing only on return, cancelling until the stay ends, the record export from preparing on, the final payment on return/done, the pending-documents notice on preparing/return. The teacher’s application offers only Fill in the form while staff_editable (its dialog has Save and submit, the highlighted button); Submit alone only sends requested corrections._ems_can_renounce() (state open and phase in choosing/preparing), checked again in action_renounce and action_staff_renounce.ems_statusbar_path with status_path from STATUS_PATHS (models/erasmus/application.py): the way an application of that state went and what is still ahead, e.g. draft,submitted,excluded; the teacher’s view of a call shows its phase.step_note (non-stored) on the mobility, shown on top of the team’s form: the destination choice (choice not open, turn and its deadline, turn missed, choosing among what is left), the proposal waiting for the Direction or the team, then what the record lacks (commitment letter, documents by who handles them, documents to review, the EU Survey). The teacher’s mobility shows staff_next_step, the same “what to do now” box as their application (ems.erasmus.application._ems_staff_next(), built on _ems_portal_progress()).grant_missing on a mobility with a destination and no grant; on a group mobility grant_missing (names), pocket_negative (share of the collective invoices above the grant) and start_warning (no host entity, start date still ahead) before The stay starts; Request the pocket money asks for confirmation that the collective invoices are in when the centre pays them. On a project, a missing grant replaces the “committed above the grant” warning, and missing support rates for the call year are one line instead of one per participant.exclusion_reason is shown on top of the form and as a list column.exclusion_reason on excluded lines to the Erasmus team (issue #792, 4.4); the
published list and its PDF never show it, as the call’s rules ask (no names; each applicant reads their own
reason in the result email and on the portal).call.action_open_destination_choice() (after the definitive resolution, with destinations) sets
choice_open and runs _ems_advance_choice(), which runs again after every choice, proposal,
rejection and cancellation. Per modality:
_ems_choosing: not
waiting for an own proposal) gets turn_deadline = now + choice_turn_hours and the email
email_template_erasmus_choice_turn. One turn at a time._ems_choices() (free and suitable for their level_id, the
level when the place was accepted). If none suits them, they talk to the Erasmus team (art. 15),
which agrees an alternative (their own find, or a destination through an intermediary
organisation) and sets it with Set the agreed destination: a dialog
(ems.erasmus.mobility.destination.wizard, issue #786) asks for the country (required), city, host
entity and dates, writes them on the mobility and runs action_agree_destination. Students only:
staff propose their activity and the Direction validates it, so the button is hidden for staff and
the method refuses them.ems.ir_cron_erasmus_expire_turns (_cron_expire_turns) clears the
turn and sets turn_missed; the place is kept and the next one gets the turn. Once nobody in the
modality is left to choose in order, every mobility that missed its turn gets free_choice (and
the turn email, without a deadline) and can choose any destination still free.Assigning copies country, city and dates from the destination - and its host entity, with the
entity’s tutor when it has a single contact, when the destination has only one - and emails
email_template_erasmus_mobility_assigned.
The same fields serve a student’s own destination and a staff member’s activity:
proposal_*, proposal_state (pending / validated / rejected), decision_note,
decided_by_id, decision_date.
| Student | Staff | |
|---|---|---|
| Sent | From the portal while choosing, with the host’s written commitment (required) | Filled from the application when the mobility is created (proposal_state empty); the staff member completes it with the exact dates (proposal_date_start/_end) and the responsible declaration for the absence (leave_declaration), both required, and sends it from the portal, again after a rejection |
Validated by (_ems_can_validate) |
Erasmus team | Direction (_ems_validators): the call’s validator_ids (the Director and the Head of Studies of FP), never the applicant; without anyone, the administrators. The Erasmus team cannot |
| Validated | Preparing, country, city and dates from the proposal | Same |
Rejected (needs decision_note) |
Back to choosing the centre’s destinations | Proposes another activity on the portal |
A pending proposal schedules a to-do (mail.activity) for every validator, marked done on the
decision; a validation emails email_template_erasmus_mobility_assigned (students) or
email_template_erasmus_proposal_validated (staff), a rejection email_template_erasmus_proposal_rejected.
The administrator can always validate, but gets no to-do. decision_note (Comment on the
decision) is required to reject and optional to validate; the validated email and the portal show
it.
A change after validation (staff, issue #697): while _ems_can_change_proposal() (a staff
mobility in preparing, not pending, date_start still in the future, company’s today), the
participant sends a new proposal from the portal (Change the activity or the dates), or the team
edits the Proposal tab and clicks action_request_revalidation. Either sets proposal_state =
'pending' and asks the validators again, keeping the mobility’s validated dates and its
destination_date (_ems_set_state only sets it when empty). Validating copies the new
proposal onto the mobility (the training absence follows, _ems_sync_training_leave); rejecting
keeps the validated activity and the email says so.
email_template_erasmus_mobility_documents with the lines
missing or needing changes (_ems_documents_to_correct: before leaving, and on return once the
end date has passed; one filled in by the team only once it is uploaded to sign). The weekly cron ems.ir_cron_erasmus_remind_documents
(_cron_remind_documents) sends the same email to every student mobility in preparation with any
(or with the commitment letter or a self-assessment pending). Staff get a to-do instead
(adriamt, 2026-11-03; _ems_sync_documents_tasks): one activity of type
ems.mail_activity_erasmus_documents per participant, on their own contact (staff can’t open a
mobility in the backend), listing what is still to hand in on the portal and due on the earliest
deadline; the cron refreshes it every week and deletes it once nothing is pending. Students keep
the email: they only have the portal, where a to-do would never show.preparation_complete / return_complete: every required line of the stage valid and every
step done. Close (action_close, audit D-5) needs both, the mobility assigned to a project,
the EU Survey validated and nothing left to pay (_ems_left_to_pay(): no payment nor invoice of
the mobility to_pay, and no part of grant_net not requested yet, the final payment included).
Closing frees a graduate’s portal, so it waits for the last payment. A group mobility’s closing is
unchanged.ems.erasmus.eu.survey, shared with the group mobilities):
eu_survey_state pending → answered (done) → validated, read only (workflow field), and
eu_survey_deadline, by default 30 days after date_end (EU_SURVEY_DAYS, editable). Once the
stay is over (_ems_eu_survey_open()), the portal asks the participant to answer it and they say
so (step eu_survey, _ems_portal_eu_survey); the team can also record it (EU Survey
answered). Answering posts in the chatter and gives the Erasmus team a to-do to validate it
(Validate the EU Survey). It replaced the checklist step “Final report (EU Survey)”, no longer in
a new call’s default steps; a call that already has the step keeps it until the team removes it.ems.erasmus.mobility.cancel.wizard,
issue #786) that asks for the reason, writes cancel_reason and runs action_cancel (which still
refuses an empty reason). The reason shows at the top of the form only once cancelled (no
Cancellation tab). The participant can renounce from the portal._ems_sync_training_leave, run when the dates or the state
change): once the Direction has validated the proposal, dates included, EMS files an hr.leave of
ems.leave_type_training for those whole days (leave_id), submitted with the declaration the
staff member gave with the proposal, so it follows the usual approval of that employee’s absences.
A request not decided yet follows the mobility’s dates and is withdrawn (unlink) if the mobility is
cancelled; once decided, a change or a cancellation only leaves a note on the mobility for the
team.The course transition (_apply_graduates) does not retire a graduate with an open mobility
(res.partner._ems_erasmus_open_mobility): it is reported and keeps the portal. When the mobility
is closed or cancelled, _ems_erasmus_release_graduate() retires an active alumnus with no open
mobility left, as the transition would have (res.partner._ems_retire_graduate, shared with it).
POST /my/erasmus/call/<id>/mobility/<step> acts on the logged-in user’s own mobility of that
call: choose (destination_id), propose (the proposal_* fields and
proposal_files), upload (document_<call document id>) and renounce (reason). The call page
shows the Your mobility card (ems.portal_erasmus_mobility).
GET /my/erasmus/call/<id>/mobility/file/<attachment id> downloads a file to sign of their own
mobility (prepared_attachment_ids).
| Model | Erasmus team | Head of Studies | Director | Portal |
|---|---|---|---|---|
ems.erasmus.destination, .call.task, .mobility.task |
rwcu | r | r | via controller |
ems.erasmus.mobility |
rwcu | r + decision_note and validating staff proposals (write() guard) |
same as Head of Studies | via controller |
A teacher reads their own staff mobility and its steps (ems.erasmus.mobility.task: read ACL for group_teacher plus rule_erasmus_mobility_task_staff_own, with _staff_all so the team’s and the Head of Studies’ rules are not narrowed). They tick or untick a step with action_staff_done/action_staff_undo (sudo after staff_can_tick/staff_can_untick): a step before leaving only on an open mobility; a step on return only once the stay has started (phase in RETURN_TICK_PHASES: stay and return, never once closed; P17, adriamt 2026-11-13: the news item is often written on the last day); and untick only what they ticked themselves (issue #787, 8.8). The team ticks any step at any time.
Menu Erasmus+ > Mobilities > Individual mobilities (team, Head of Studies, Director), with a Proposal to validate filter.
The coordinator calculates each participant’s grant in the Beneficiary Module and enters it on the mobility. The centre may pay part of it directly (flights, accommodation, course fees): those provisions of services are deducted, and the Secretary transfers the rest to the participant (art. 5 of both calls).
erDiagram
ems_erasmus_mobility ||--o{ ems_erasmus_provision : "provision_ids"
ems_erasmus_invoice ||--o{ ems_erasmus_provision : "provision_ids (one share per participant)"
ems_erasmus_invoice }o--o{ ems_erasmus_mobility : "mobility_ids"
ems_erasmus_mobility ||--o{ ems_erasmus_payment : "payment_ids"
ems_erasmus_mobility }o--o| res_partner : "host_partner_id (is_erasmus_host), host_contact_id (its tutor)"
| Model | Purpose |
|---|---|
ems.erasmus.provision |
Part of a grant the centre pays directly: concept (travel, accommodation, course fees, other), description, amount, the invoice it comes from (optional). Added by hand on the mobility’s Grant tab, or created by an invoice. |
ems.erasmus.invoice |
A supplier’s invoice the centre paid for some participants: number, supplier, date, concept, project, amount, file, mobility_ids. Creating it, or changing its amount or participants, splits it again into equal shares (_ems_split(): rounded down to the cent, the remainder on the first share); a share can then be edited by hand, and unassigned_amount shows what is left. Changing only the concept or description updates the shares in place. |
ems.erasmus.payment |
An amount the Secretary transfers: kind prefinancing, final or single; amount; state to pay / paid, who and when, receipt_ids (the transfer receipts); the participant’s IBAN and holder (bank_account, bank_holder: their first res.partner.bank, read with sudo). |
ems.erasmus.transfer.wizard |
Register transfer: the Secretary picks the grant payments or the invoices one bank transfer pays (several at once, e.g. a batch of grants or a travel agency’s invoice), its date and its receipt; one ir.attachment is created and linked to every one of them, which become paid. |
ems.erasmus.project.document |
A file of a project that no other EMS record holds (the grant agreement, budget follow-up, exceptional costs, dissemination, the final report…), in one of the project’s five categories (category), optionally about some participants, whose records then show it (see records.md). |
On the mobility: grant_amount, prefinancing_percent (default 80, above 0 and up to 100),
provision_amount and grant_net (= grant - provisions, what the participant receives).
Request the first payment (action_request_prefinancing) creates the prefinancing, grant_net x
percentage, or a single payment at 100 %. Request the final payment
(action_request_final_payment) creates the rest, grant_net minus every payment already
requested, so a change of the grant or the provisions after the prefinancing lands in it. Each
can be requested once (can_request_prefinancing, can_request_final), from the preparing
state, and never for nothing (zero or less raises). An unpaid payment can be deleted by the team
and requested again.
Paying: only the Secretary (or the administrator) registers a transfer
(action_register_transfer on payments and invoices opens the wizard) or undoes one
(action_mark_unpaid opens ems.erasmus.undo.transfer.wizard, with a required reason, audit
D-18); both write with sudo after checking the group (_check_payer). A direct
write of state/paid_date/paid_by_id/receipt_ids raises, a paid payment cannot be changed or
deleted and a paid invoice cannot be deleted. Invoices have the same state, paid_date,
paid_by_id and receipt_ids as payments.
The Secretary’s tasks: every payment requested and every invoice created schedules a to-do for
whoever holds the Secretary role (ems.role_secretary; without anyone, the administrators),
_ask_transfer(); registering the transfer marks it done and undoing it schedules it again. Both
models inherit ems.base for it, so the Secretary sees what is left to pay every working day in
the daily pending-tasks digest (docs/en/developers/shared/task_digest.md), with no mechanism of
its own.
Portal: once the mobility is in preparation and has a grant, the participant sees it
(_ems_portal_grant()): the grant, each provision of services, what they receive and each payment
with its state. The call’s page also links the published call.
Host entities: res.partner.is_erasmus_host marks a company, school or course provider that
hosts participants; its contacts are the tutors at destination, with their email. Menu Erasmus+ >
Configuration > Host entities (action_erasmus_host_entity: its own list and search view, the native kanban and form). The mobility’s and the
destination’s host fields only offer host entities, the mobility shows the tutor’s email
(host_contact_email) and picks the tutor automatically when the entity has only one contact. The
Learning Agreement already says it is signed by the host entity (sign_host); sending it to the
tutor to sign waits for the integrated e-signature.
Projects: the team assigns each mobility to a project (project_id, phase 5) before entering it
in the Beneficiary Module. Payments and invoices carry the project for the Secretary. The centre’s
active projects are seeded once from data/custom/erasmus/ems.erasmus.project.csv (agreement
number, kind, dates; maintained in the app afterwards, like every data/custom/ record). A project
also has its budget (grant awarded), final_payment_date and keep_until: SEPIE asks to keep the
documents 3 years after the final payment of the grant, 5 when it is above 60,000 €.
Economy: what each mobility commits and has been paid, the grant’s amendments, SEPIE’s transfers, the project’s own expenses, the organisational support, the economic panel and its Excel export are described in economy.md (issue #762).
Documents and exports: the project’s documents in five categories, each participant’s record in
four, and the ZIP exports (a record or a whole project, with index, manifest and SHA-256 hashes,
logged) are described in records.md. The host entity also has its Erasmus+
erasmus_oid.
The host entity’s form is the general contact form (base.view_partner_form plus EMS’s
views), whose details block (address, country, website, email, phone, OID) is hidden by
read_only_user, meant for the students’ data. res.partner.can_edit_erasmus_host (non-stored:
ems.group_erasmus and the contact is a host entity or a host entity’s tutor, issue #777) shows it
to the Erasmus team there and nowhere else. Known limit, decided with the coordinator
(2026-11-09): that form also reads student data (ems.enrollment, ems.enrollment.slot,
ems.authorization, ems.student.benefit, ems.student.document, ems.study), which
ems.group_erasmus alone cannot, so a team member must also be a teacher (both are today), or the form
ends in an access error. A form of its own for host entities would lift this limit.
An invoice is either a group’s or some participants’ (_check_group_or_participants, issue
#777): mobility_ids makes shares of the participants’ grants and group_mobility_id counts in the
group’s figures and pocket money, so both at once would count it twice. A group’s invoice has no
shares, so its unassigned_amount is 0. The constraint only checks what is written from now on.
| Model | Erasmus team | Secretary | Head of Studies / Director |
|---|---|---|---|
ems.erasmus.provision, .invoice |
rwcu | r (+ register the invoice’s transfer) | r (Director, issue #762) |
ems.erasmus.project.document |
rwcu | rwc | r |
ems.erasmus.transfer.wizard, .undo.transfer.wizard |
- | rwcu | - |
ems.erasmus.payment |
rwcu (unpaid only; write() guard) |
r + register the transfer (wizard) | r (Director, without the bank account) |
Undoing a transfer (action_mark_unpaid, Secretary, through its wizard) posts in the payment’s or
invoice’s chatter who undid it and why, when it had been paid and by whom, with its receipts attached; its state is tracked. A paid
invoice cannot change, as a paid payment cannot. The first payment (prefinancing or single) and the
final one exist once per mobility: a unique index (ems_erasmus_payment_once_per_mobility, created in
init(), so on install and on upgrade) refuses a second one requested at the same moment, which the
check in action_request_* cannot see from its own transaction. A payment is only requested for a
mobility in preparation or closed.
| ems.erasmus.call, .project | rwcu | r | r |
| res.partner | r every contact; wc only host entities and their contacts (rule_contact_erasmus_*) | (unchanged) | (unchanged) |
The mobility’s Grant tab and its grant columns are only for the team (groups=), so the Head of
Studies and the Director, who read mobilities, never load the grant models. Menus Erasmus+ >
Configuration > Host entities (team), Erasmus+ > Projects and Erasmus+ > Financial management > Grant payments,
Services paid by the centre and Project expenses (team, Secretary and, read-only, the Director; the Secretary sees only those under Erasmus+). The project form’s tabs follow the same split (mobilities:
team and Head of Studies; services paid by the centre, project expenses and payments: team, Secretary and Director). The
Secretary also enters services paid by the centre and reads the individual and group mobilities to say whom they are for (issue #791; rule_erasmus_mobility_staff_all, rule_erasmus_group_mobility_head_of_studies).
ems.erasmus.history)A person’s Erasmus+ participations as EMS has them: a read-only SQL view (_auto = False,
models/erasmus/history.py), one line per individual mobility and one per group mobility
participant, leaving out cancelled mobilities and withdrawn participants. It keeps text and dates
only (the call’s or group mobility’s name, project kind, country, city, dates, Planned or
Completed), so whoever reads it needs no access to the Erasmus+ models.
flowchart LR
M[ems.erasmus.mobility<br/>not cancelled] --> H[ems.erasmus.history]
P[ems.erasmus.group.participant<br/>active, mobility not cancelled] --> H
H --> F[Student form<br/>Studies tab, under the academic history]
H --> A[Application<br/>Scoring tab, for First mobility]
res.partner.erasmus_history_ids shows it on the contact form, under the academic history, to the
same roles that read that history (teachers, Secretary, Head of Studies, academic admin, student
data reader) plus the Erasmus team; hidden when empty.ems.erasmus.application.erasmus_history_ids (related) shows it on the application’s Scoring
tab, next to First mobility, which the team still sets by hand: the history only starts with
the mobilities that go through EMS (the first call managed with it is 2026-2027), so earlier
years are not in it unless they are imported.| Model | Teacher / Secretary / Head of Studies / admin / student data reader / Erasmus team |
|---|---|
ems.erasmus.history |
r |
ems.erasmus.application.document.todo_state): what the record shows, so that
only what the participant has to do now is red. A missing mobility document is waiting_team
when the team uploads it (or fills it in first), not_yet while the destination is not set, before
its opening day or, for a return document, before the end of the stay; the portal’s count, the
“what to do now” box and the backend list use it. signature_progress (“2 / 3”) replaces the two
signature columns in the record’s list.has_provisional_resolution,
has_final_resolution), the latest first; the tabs are two nested notebooks (selection_block,
mobility_block); the tie warning is above the title. Issue #767: the top has two blocks,
Settings and Calendar (notes 2.3 and 2.6 of the 46.0 review: no is_accepting nor
reminder_days), with the four deadlines folded in a <details> element (an Odoo 18 form has no foldable group of its own; the form compiler keeps plain HTML elements); mobility_block only
shows with has_final_resolution (lines added later still reach every mobility through
_ems_sync_requirements); on a staff call, Documents is hidden and Panel only shows once
closed. The modalities list shows the project only on a staff call.ranking_result (non-stored) gives the cut of the places; the menu’s ranking is
ordered by call, with its column. The application list counts documents_to_review (never on a
draft). The application’s Documents tab shows each line’s file_state as a badge (greyed out when
optional or not applicable), the files that count (current_attachment_ids), the link_url of a
link and, optional, attachment_ids (Every version).ems.erasmus.interview.schedule (wizard, Actions of the call) gives the admitted
applicants consecutive slots, the same place and evaluators, and sends the calls. The evaluators’
tasks (one per interview, done on submitting it) are scheduled quietly
(mail_activity_quick_update) and each evaluator gets the whole list as an ems.info_notice on the
call (_ems_notify_evaluators), in their next daily summary, not one email per interview. The interview
form writes annex 4’s descriptors under each criterion; interviews and plan ratings have
Submit and next (action_submit_next).rating_status (stored) shows an abstention as such.scores_hidden (non-stored, depends_context('uid')) replaces the zeros of a staff
application with an explanation while the panel rates (_ems_panel_pending, shared with
_read_format); Mobilities > Pending validation (action_erasmus_mobility_to_validate); the
place offers and claims are no longer in their menu.ems.erasmus.mobility._ems_sync_requirements) reads as
superuser: the Director validating a staff proposal does not see the confidential health card, and
it was created again._ems_country_in, in every installed language).ems.mail_notification_erasmus, Odoo’s light layout
headed “Erasmus+” instead of “Your group_erasmus/group_erasmus_coordinator (they got every
team to-do); they keep every right through group_academic_admin.show_time: False, so it reads as a day
in lists and read-only fields. Odoo’s own datetime input ignores that option while editing, which
is what we want: an editable deadline keeps its hour (show_seconds: False removes the seconds),
because a typed date with no time would close it at 00:00, a day early. Hours are kept on purpose
on application/interview.interview_date, interview.schedule.date_start (appointments),
mobility.turn_deadline (counted in hours) and the deadline of offer and offer.wizard (any
time of the day). The portal still shows hours. TestErasmusDatesNumbers walks every view and
fails on a new datetime that doesn’t follow this.ems_blank_zero (static/src/js/backend/blank_zero_field.js) is
Odoo’s integer widget printing nothing for 0, with the view’s placeholder while editing: no limit
and any length (support.rate.band_to, min_days), no data (quality.history.staff_*), not
known (diffusion.recipient_count). Odoo has no option for this and invisible would hide the
input of an editable list’s row. Only the display changes: the column still holds 0..po, with the same
msgid and only the Erasmus+ references. Odoo binds a block to its references, so it works; never
merge those blocks.string= on the list’s field, so a form keeps its full label. The
earlier courses’ list hides the source, which reads in full in its own form.ems_score_out_of (static/src/js/backend/score_out_of_field.js): Odoo’s float widget with
options="{'max': 40}", printing “36 / 40”. The maximums are the call rules’ and
TestErasmusLabels checks them against the code’s scales (they add up to 100 and 10).action_mark_needs_change as Reopen: the same button twice in
the view. can_mark_needs_change and can_reopen (computed on the document line) say which one
shows, so the lists and forms that carry it share one rule: neither is offered once the file
is sent back, or for a document the team provides that nobody signs.action_erasmus_ranking opens view_erasmus_ranking_common_list from the menu
(what every call has, grouped by call); action_view_ranking opens a call’s own list, with the
student criteria grouped by modality or the staff criteria in one list. The menu doesn’t group by
modality because a staff call ranks everyone together, and a modality would split it. No list
colours its rows (the resolution does, with its legend); the state badge has the colour.aggregator=None on ranks and scores: Odoo sums an integer or a float in a group’s row, which
means nothing for a position or a score. It must be None: fields_get() then leaves the key out,
and the client leaves the field out of the group’s order. False reaches the server, which fails
with “Aggregate method is mandatory” when a default_order or a click on the column orders by it.search_default_group_applicant), with two stored
fields for the group’s row: rated_count (1 for a submitted rating, summed) and plan_mean
(related to the application’s plan_score, max). An average of score would be wrong: an
abstention and a rating still to come are stored as 0, and Odoo’s float column has no NULL. Both
are computed on upgrade; the row’s own cell is invisible.parent.audience hides the legal guardian’s and the centre’s tutor’s signature on a staff call.review_comment only shows where it says something, and the
results tab says the resolution’s kind, with no zeros on an admission list.record_progress (non-stored, computed for the page only) and
short headers (Ready, Back); the proposal’s state and the rank are optional. The search view
has Students / Staff filters on the stored audience. view_erasmus_mobility_kanban groups
the cards by state (no drag and drop: a phase changes through the form’s actions).
Pending validation (action_erasmus_mobility_to_validate) has its own list,
view_erasmus_mobility_to_validate_list: what was proposed (proposal_*), the same for the
Direction and the Erasmus team.responsible (non-stored, the call
document’s handled_by with one-word labels), apart from todo_state, whose waiting_team reads
Waiting for the team (also on the portal). The table shows current_attachment_ids;
prepared_attachment_ids (the team’s upload) only on lines the team hands over, attachment_ids
(every version, editable) optional.registration_ids (the columns of the ranking:
rank, name, group, ranking_average, proposed and final result); the history of the selection
(selection_history: dates, notes, published lists, claims) closes the tab. The Participants tab
shows seven columns and never colours a withdrawal’s missing documents.active toggle (archived from Actions); both mobility tables have
a separator and hide when empty. The exports log reads ems.erasmus.export.subject (non-stored:
the scope plus the participant’s or the group’s name, from _ems_target_name(), shared with the
display name) and leaves the counts blank on a participants’ spreadsheet (ems_blank_zero).counted_amount, titled Amount (amount is optional, Amount
entered). The economic panel and the project list both call kind Kind.ems.erasmus.satisfaction has no pivot view: the quality panel’s satisfaction
breakdown gives the same means.res.partner.erasmus_mobility_count (non-stored, one
_read_group per mobility model for the whole page, cancelled ones aside; split into
erasmus_individual_count/erasmus_group_count for the host entity’s buttons, issue #784). The organisational
support rates open grouped by year, newest first; call_year has aggregator=None on rates and
projects so that a group’s row never sums years.o_field_highlight form class (every field’s line visible before it is clicked) and native
placeholders with an example of what to write. The document upload dialog says which files it
expects.ems.css narrows th.o_list_button to 64px for icon-only buttons
inside attachment_ids; a list whose buttons carry their text (Hand in, Sign it here, PDF)
opts out with the class o_ems_list_text_buttons on its <list>.current_attachment_ids (Handed in) and todo_state, whose missing value reads To hand in
everywhere (portal included); review_comment only once submitted. The review columns stay in
the team’s form.string), the full name in help.ems.erasmus.resolution.call_audience (related) hides the modality_id
column for a staff call; score_total reads Score.div, not a group, whose
label column squeezed the long texts).file_state’s missing also reads To hand in, as todo_state: the family’s portal and the
coordinator’s From the application block use it.staff_record_summary (You have handed in 1 of 4) counts the
mobility’s required lines with handled_by == 'participant' handed in (file_state to review or
complete): neither what the team uploads or prepares to sign nor the application’s lines (the old
record_progress “1 / 6” counted the identity document handed in with the application, which the
teacher’s list never shows). From the Erasmus team and Comment for the applicant are
column_invisible until record_has_team_files/record_has_comments. A read-only Grant tab
shows grant_net (Your grant), grant_paid (paid payments) and grant_to_receive
(grant_net - grant_paid, never below 0); these and provision_amount/grant_net are
compute_sudo, since a teacher has no access to payments, provisions or invoices.placeholder example too (Odoo’s
SelectionField shows it as the empty option), greyed by static/src/scss/backend/selection_placeholder.scss
with Odoo’s $input-placeholder-color (SCSS: Odoo has no CSS variable for it).pending_amount reads Committed, not paid yet, its help explaining the
difference.project_label (non-stored) shows the invoice’s project, or its participants’
(mobility_ids.project_id); Various when there are several. project_id itself is unchanged
(it is the project of an invoice of no mobility, see Economy).o_field_highlight; the satisfaction lists and Earlier
courses use short headers with the full name in help; the latter’s staff columns are
optional="hide".help that says why the list is empty instead of Odoo’s “Create a new
document”.description and the group’s
programme; a line over the project’s documents, with record_complete_count as a native
progressbar (max_value: record_count); the quality panel’s indicators explain themselves on
hover (title built in _compute_panel; the PDF keeps the full text). A group participant shows
only its name inside its group (ems_participant_name_only, a depends_context on the display name,
passed through the follow-up’s log_ids context).portal.portal_breadcrumbs, inherited by portal_erasmus_breadcrumbs)
names the page from erasmus_breadcrumb, a value each controller sets (the call, the group mobility
or the published list): a call variable would leak from the overview’s loop.portal_erasmus_commitment_letter, folded in a
<details> for the student’s and the family’s forms alike._ems_preparation_tasks('staff')): no preparation
sessions, and the activities left for the groups are on Moodle._compute_step_counts, one _read_group per model for the
whole set, read as superuser: only numbers, each list still applies the reader’s rights). Ranking
stays after the definitive resolution.name='documents' kept for the tours); the teacher’s file as a Staff record
button (action_open_employee).ems_mobility_short_name, so the breadcrumb (a
depends_context display name) is only the participant; the application is a button
(action_open_application) and the rank stays on it. While the mobility is choosing, its empty
destination fields are hidden. The record is a progressbar (record_done / record_total), with
record_overdue the only red; the portal shows the same bar. The EU Survey shows once stay_over
(date_end passed, or done). The commitment letter says its state in one line
(commitment_status, commitment_guardian_status on the ems.erasmus.commitment mixin, so the
group participants get it too). Staff never see the self-assessment tab.remaining_days widget on deadline, only while pending.travel_paid_by is the positive form of
no_direct_costs (computed with an inverse, no new column).economy_document_ids was removed) and shows the figures from before EMS
only when set or for calls before 2026.erasmus_individual_count,
erasmus_group_count), and the native Meetings (calendar) and Relations (partner_multi_relation)
buttons hidden on host entities.