Saturday, October 14, 2017

I realized that making Person Certifiable was not a good idea because it adds a database field printed_by to Person for every application which has excerpts installed. In Lino Welfare and Lino Voga they won’t want that field. So I changed this: Partner is now just a lino.modlib.printing.Printable, and the std fixture of lino_xl.lib.contacts now creates an ExcerptType for the new contacts/Person/TermsConditions.odt template. Every site which uses contacts, excerpts and appypod will now try to print one person when loading the demo fictures. But our template has a condition: site_company must be set. When site_company is empty, this template makes indeed no sense. In the demo project this caused a failure during inv prep. The actual bug here was that Lino Noi had no site_company. I fixed this.

All this caused also a few changes in the API around PrintableObject, Printable and Certifiable: e.g. I moved the get_printable_demo_objects from Certifiable to Printable. I merged PrintableObject into Printable, moved some code from lino.core.model.Model to lino.modlib.printing.Printable, …

I renamed contacts/Person/Default.odt to contacts/Person/TermsConditions.odt because otherwise Lino would find excerpts/Default.odt when excerpts is before contacts in get_installed_apps().