Monday, October 20, 2014

Still working on docs/tickets/136

Bestätigung “Kleiderkammer” fertig

I found a last bug (in the fixture which generates demo data) which caused example of the clothing_bank.body.html for Paul Frisch in the Beispiele section of the German user manual to be wrong. Now I finally dare to link to it: here it is!


  • Rückerstattung - Refund
  • Kostenübernahme - Cost transfer
  • Clothing costs transfer - Kostenübernahme Kleidung

Recipient of an excerpt

However there were still some “details” to fix. For example the following item turned out to be rather tricky:

  • Wenn kein Empfänger angegeben ist, trotzdem den entsprechenden Platz vorsehen

The excerpts/Default.odt template is designed to be overridden by local site administrators in order to match their letter paper. To minimize their configuration work, the template should work for any type of excerpt, not only for confirmations.

To solve this, I removed the get_print_recipient method from dd.Model, added a new field lino.modlib.excerpts.ExcerptType.print_recipient and replaced in excerpts/Default.odt the test do text if obj.get_print_recipient() by do text if this.excerpt_type.print_recipient). This was also inspired by Josef Kejzlar’s suggestions for ticket docs/tickets/134: developers who don’t use the lino.modlib.excerpts module should not be bothered with a method like get_print_recipient in Lino’s dd.Model class.

And I discovered that it was no longer possible to specify a recipient for a presence certificate. So lino.modlib.excerpts.Excerpt now is a ml.contacts.ContactRelated again.

Change in local config : Adapt local excerpts/Default.odt template: replace the condition do text if obj.get_print_recipient() by do text if this.excerpt_type.print_recipient).

Change in database structure : New field lino.modlib.excerpts.ExcerptType.print_recipient. New fields in lino.modlib.excerpts.Excerpt because it now is a ml.contacts.ContactRelated again.

Two changes in atelier

The doc_trees parameter is no longer in but in the project’s main module. This was necessary in order to load also non-standard doc trees into the intersphinx_mapping.

intersphinx_url changed to intersphinx_urls and is now expected to be a dict with one URL for every name in doc_trees.