Thursday, October 23, 2014

Recipient of an excerpt

Continued on ticket docs/tickets/136.

Finished the following item:

  1. cvs_emitted vom Reiter “Verschiedene” in den Reiter “Lebenslauf” verschieben. Ganz unten.

This needed another little change :

  • When there is no content, the function of a shortcut field (lino.modlib.excerpts.Shortcuts) now returns an empty <DIV> tag. Otherwise the layout manager failed in these cases.

Then once more back to the following item:

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

The basic system was already okay, but we also want a border around the address. This caused some fiddling in excerpts/Default.odt.

It seems that appy.pod does not look into frames, so I use a simple paragraph with border. A trick which in turn needed a new positional argument min_height to get_address_html.

Adapted the general excerpts/Default.odt template (until now I had been focussed on the template in Lino Welfare).

Miscellaneous changes while working on the above:

  • Removed the field contact_role from layouts of lino.modlib.excerpts.Excerpt (i.e. it is no longer visible).

    TODO: Maybe we should split ContactRelated into Recipient and Represented.

  • welfare.aids : When representing a Granting or a Confirmation as a string, the name of the aid type is now at the beginning. For example “22.05.14/EiEi/116/1” becomes “EiEi/22.05.14/116/1”.

  • Changed verbose_name of ml.cal.Guest from “Guest” to “Presence”. Because a presence is not a guest.

  • As a result of docs/tickets/134, the Addressable mixin is no longer in lino.dd. Application code must import it directly from its true place lino.utils.addressable. Renamed its address_lines method to get_address_lines. Adapted documentation and test cases.

  • Removed the lino.modlib.partners module because it had become obsolete and was never used.

  • Removed /docs/about/license.rst since these considerations are now obsolete.

Directory structure in Lino Così

I noticed that the projects directory structure in Lino Così was very obsolete. Since Manuel will soon dive into this, I decided to adapt it to the modern style.

Date and time fields in lino.modlib.export_excel

Josef Kejzlar contributed a patch to his lino.modlib.export_excel app. I installed it via the command line and updated /dev/git because I want to learn.

Adapted the copyright headers in the files of this app, adding Joe’s name. Because after docs/tickets/125 it is rather unlikely that somebody someday would have to open a law suit.

Wrote a new test case Exporting to Excel which exports a table with dates. Not sure whether this covers the problem though. Continued tomorrow.