Thursday, June 20, 2019

I worked on #3086 (together with Hamza at the beginning). Some optimizations for managing absences and holidays of workers.

Changes needed for Lino Presto.

If a presence_guest is specified this filter no longer applies to entries whose type has all_rooms enabled (which is the case e.g. for holidays).

Multi-day events must be shown on every day of their date range. Lino didn’t yet handle them correctly

I added a field because not all events should automatically fill their presences ( When is True, Lino also removes unwanted guests each time you hit the save button. But for example in Lino Presto when registering a absence day or a worker, the list of suggested guests is usually empty (because the project is empty), and we don’t want Lino to remove any manually added guests.

The std fixture for now adds a new entry type “Absence” with this configuration. The demo2 fixture adds some “absences for private reasons”, some of them several days.

En passant this caused an avalanche of optimizations.

I reviewed the way how the filter parameters for calendar entries ( are being inherited by the calendar views. Especially this was a bit too hackerish for me:

def setup_parameters(cls, fields):
    cls.params_layout =
    cls.parameters =
super(Events, cls).setup_parameters(

There is a danger that this caused bugs which are not covered by the test suite.

In the filter parameters of, I renamed partner to presence_guest and moved some help texts to the specs page.