============================
Wednesday, December 10, 2014
============================

Continued to work on :ticket:`27` (Änderungen Ausdruck Budget).
Updated :lino:`yesterday's blog entry <1209>`.

After a night of sleep I understood: the best and most sustainable way
to solve this is to move the business logic from the
:xfile:`Default.odt` file into a body template
:xfile:`budget.body.html` (and to convert the current template into a
document which uses the :attr:`body_template
<lino.modlib.excerpts.ExcerptType.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 :lino:`/topics/stories`.  Or rather to extend and
generalize the concept of "stories" which I had already begun once
upon a time (for the :class:`ad.Report` class).