Tuesday, May 7, 2019

Presto prototype getting ready

I installed the prototype for Presto on their site and plan to invite them soon to the first visit. This visit will be important for Lino, I don’t want to know what would happen if would fail (which won’t happen of course ;-).

I released Lino and XL to PyPI (despite the fact that there are still failures in the test suites).

I updated the German docs 19.5.0 (2019-05-14) and Eine Besichtigungstour.

Some minor layout changes in lino_presto.lib.contacts.

Found some bugs: end_time, presto.Clients was showing only newcomer clients.

Difference between “Client” and “Customer”

I read this and thought: Yes, that’s what I felt when I chose “customer” and not “client” in the ledger plugin. In the lino_xl.lib.clients plugin the clients are even more specialized: they are humans (physical persons) and not organizations. There are businesses who call their customer “client” even though it is an organization (e.g. lawyers), but we do not have such customers at the moment. Of course I’d say that the customers of Rumma & Ko are long-term customers and have a profound and well-deserved “trust” in us, but they remain organizations, not humans.

Customizing filter parameters

  • setup_parameters is responsible for defining parameter fields

  • param_defaults is responsible for setting default values for parameters

  • get_request_queryset is responsible for translating the parameter values into a queryset

The methods can be defined either on the model or on a table.

An example is lino_xl.lib.ClientBase

Minor changes in Lino Avanti

I fixed their #2990.

Took me some time because things are complex and because I had to understand the required_roles for the calendar views. For example I tried to have OfficeStaff no longer inherit from OfficeOperator because this caused a TypeError “Cannot create a consistent method resolution” in avanti where SiteAdmin inherits from SocialWorker…

The required_roles for the new calendar views were not yet set as it should (I guess that Tonis and Hamza simply didn’t care because we never talked about it). In general you must be lino_xl.lib.office.OfficeUser or lino_xl.lib.office.OfficeOperator (or both). Note that avanti overrides the required_roles of lino_xl.lib.cal.CalendarView because they have different rules: only users who may see client names may see the calendar.

Changes en passant:

  • The new calendar views are now visible for all applications (no longer only presto).

  • Default calendar view is now monthly instead of weekly

  • Restore Event.__str__ previous version

  • Renamed some classes in lino_xl.lib.cal