Tuesday, February 17, 2015

Cool: It is now possible to answer free text via the summary view of polls.AnswersByResponse (asked by Mathieu 0213). This change was quite a challenge. It took me two days and caused some subtle new features to Lino:

  • Fields specified as hidden_elements of an actor used to simply have no effect in any FormLayout. Now they have: they are included as hidden fields, so they can hold data, and submitting the form will transmit their data. The actual change is in LayoutHandle.create_element.
  • It is now possible to define a slave table with a master which is not a subclass of django.db.models.Model. This feature is not used however. I thought that I would need it, then realized that the master for AnswersByResponse is a normal database model ‘polls.Response’.
  • Another series of Changes in the action API (see below).

Changes in the action API

It is now possible to replace:

btn = ar.insert_button(...)


sar = insert_action.request_from(ar, ...)
btn = sar.ar2button(...)

The summary view of polls.AnswersByResponse shows why it is important that ar2button does not check permissions.

This change includes the new method lino.core.actions.Action.get_status(). (TODO: Formalize the “status” using a class object ValidWindowStates, similar to ValidActionResponses).

Listes de rendez-vous

Minor changes:

  • Changed the label of MyEvents from “My events” to “My appointments”
  • Dans les deux tables (MyEvents et EventsByDay) ajouté la colonne «Type d’événement» de manière à ce qu’on voit si c’est un entretien en interne ou en externe.

à discuter:

  • Dans «Rendez-vous aujourd’hui», supprimer la colonne «Attribué à»

Fields newcomer_consultations and newcomer_appointments go away

The fields newcomer_consultations and newcomer_appointments are not necessary, we can use newcomer_quota instead.

We don’t need to differentiate between consultations and appointments. Every user with nonzero newcomer_quota (and nonempty calendar) will be listed:

Mon coup suivant sera d’enlever ces deux cases à cocher car j’ai compris qu’elles sont inutiles. C’est le champ “Quota nouvelles demandes” (dans l’onglet “Intervention” d’un utilisateur) qui décidera si les filles à l’accueil peuvent faire un rendez-vous avec un nouveau bénéficiaire pour cet agent. La table “Créer un rendez-vous avec” dans l’onglet “Personne” contiendra (1) dans le cas d’un bénéficiaire accompagné la liste de ses intervenants et (2) dans le cas d’un bénéficiaire nouveau la liste des agents qui ont un “Quota nouvelles demandes” > 0.