===================================== 20130910 (Tuesday, 10 September 2013) ===================================== Worked on this: - In `reception.WaitingVisitors` it should not be allowed to delete a row because that would leave the cal.Event without Guest. The solution is to simply make all variants of `Visitors` tables readonly by setting :attr:`editable ` to `False`. :attr:`editable ` does not deactivate the :attr:`editable `. This made me stumble on something similar to what we had a few days ago where the `label` of an Actor wasn't inherited. Now it is the `editable` property. I applied the same changes for `editable`. MyWaitingVisitors is maybe not needed as a menu entry since it is also a get_admin_main_items. But if i remove it then i must edit pcsw_tests.py. Waiting for user feedback before doing this. Removed a test case from :ref:`welfare.specs.debts` because (1) it failed und (2) was rather strange anyway. Updated the :ref:`demos`. How to configure additional text to appear in sales invoices ------------------------------------------------------------ :class:`lino.utils.appy_pod.Renderer` has now a new built-in function `jinja` New file :srcref:`sales/Invoice/trailer.body.html ` Used from :srcref:`sales/Invoice/Default.odt ` And :ref:`faggio`: has a special `trailer.body.html` which adds one item for each enrolment mentioned in this invoice::

{{_("Your enrolments:")}}

{% for enr in this.get_invoiceables(settings.SITE.modules.courses.Enrolment) %}
  • {{enr.course}} : {{enr.course.events_text()}}
{% endfor %} Some optimizations: - Until now sales.Invoice used the hard-coded build method :class:`appypdf `. Journal is now a PrintableType (and thus has a new field build_template) Note that not every Voucher is necessarily a TypedPrintable. - :func:`lino.core.web.site_setup` : changed order of discovery for the loaders: first come the :meth:`get_settings_subdirs `, then only the packageloaders. Continued on :ref:`faggio`: --------------------------- - Removed EntryStates "draft" and "published". - Event guest are now filled with the enrolled pupils. New SiteConfig field pupil_guestroles. Custom fields of Choicelist Choices ----------------------------------- Something cool: application code can now simply define custom fields of a :class:`lino.core.choicelists.Choice` by declaring them on the :class:`lino.core.choicelists.Choicelist`. First usage example are `cal.EntryStates` and `lino.UserLevel`. If you wanted to show such custom fields in a table, then you had to define a virtual field:: @fields.virtualfield(models.CharField(_("Short name"),max_length=2, help_text="used to fill UserProfiles")) def short_name(cls,choice,ar): return choice.short_name Now you can just write:: short_name = models.CharField(_("Short name"),max_length=2, help_text="used to fill UserProfiles") todo ---- - demo.py : pupil_guestrole - Anwesenheiten erfassen können - suggest_guests wieder raus? weil es auf dem Papier reicht?