Wednesday, December 10, 2014

Continued to work on #27 (Änderungen Ausdruck Budget). Updated yesterday’s blog entry.

After a night of sleep I understood: the best and most sustainable way to solve this is to move the business logic from the Default.odt file into a body template budget.body.html (and to convert the current template into a document which uses the body_template field).

It took me another few hours to discover that unfortunately this was not yet the solution. I cannot use a body template for generating a printout of a debts.Budget because this document requires well-formatted tables (column widhts as specified, and e.g. number columns right aligned). A body template generates HTML which is then convered to XHTML. But this way the generated tables are not well-formatted.

So I needed to invent https://www.lino-framework.org/topics/stories.html. Or rather to extend and generalize the concept of “stories” which I had already begun once upon a time (for the ad.Report class).