===================================
20140210 (Monday, 10 February 2014)
===================================


Endspurt vor Baustellenbesichtigung :ref:`welfare`:

- Übersetzungen

- `pcsw.Client` is now also a subclass of :class:`Attestable
  <lino.modlib.attestations.Attestable>`. 
  This raises the question of how to differentiate, for end-users,
  between `AttestationsByProject` and `AttestationsByOwner`.

  Oder auf gut Deutsch: Wie soll ich den Unterschied zwischen

  - `AttestationsByProject`: Bescheinigungen, die direkt oder indirekt
    für diesen Klienten ausgestellt wurden

  - `AttestationsByOwner`: nur die direkten Bescheinigungen, deren
    `owner` ein Klient ist. Momentan sind das Lebensläufe und
    (eventuell... sh. nächster Punkt) eID-Info.

Soll eID-Info eine DirectPrintAction bleiben? Nein, die mache ich
auch zu einer Bescheinigung. Denn dann haben wir eine Historie der
gemachten Ausdrucke dieses Dokuments. Damit haben wir auch gleich
einen ersten Fall einer Aktion "Bescheinigung erstellen", die
mehrere mögliche `AttestationType` hat, also bei der noch ein
Dialogfenster nötig ist.  Um das alles zu regeln und konfigurierbar
zu machen, haben wir die neuen Felder `primary` und `skip_dialog`

Moved `eid-content.odt` to
`lino_welfare/config/attestations/Attestation`.

Note about `this` and `self` in templates: we have two templating
machines Jinja and Appy.  Jinja uses the name ``self`` to access some
part of the renderer, and you cannot override this. But for historical
reasons there are .odt templates containing ``self`` for representing
"the current object".


I had to remember what I learned :blogref:`20130809` about LO's
conditional fields: LibreOffice doesn't actually just insert the
`Then` or `Else` part depending on the condition, but uses artificial
intelligence: if the text contains two periods, then it is expected to
be a database field.  To avoid this magic behaviour, simply include it
within quotes.  Good to know...


Miscellaneous changes:

- Lino didn't yet support context-sensitive choosers with a
  GenericForeignKey field in the context.
  And `Attestation.type_choice` needs this.
  Started :srcref:`docs/tickets/97`. 
  The current solution 
  (:class:`lino.utils.instantiator.GenericForeignKeyConverter`)
  is rather hackerish but works for me.

- :meth:`atelier.test.TestCase.run_simple_doctests` didn't notice when
  an invalid filename was given.