Wednesday, April 1, 2015

About plugin inheritance (continued)

I finished to digest what I discovered yesterday (not definitively finished of course, but for this time):

  • I renamed module lino_welfare.modlib.countries to lino.modlib.statbel.countries, and lino.modlib.statbel is no longer a plugin but just a package which contains plugins (similar to, I currently call them “Differentiator packages”).

  • The set_detail_layout method is still necessary and useful. We cannot simply subclass a table when we want to override its detail_layout, because when that table has subclasses who did not define their own detail_layout, then we also want to override thoses classes’ detail_layout. (The same applies to insert_layout of course.)

  • We did get rid of two inject_field usages.

  • Updated /dev/plugin_inheritance.

I removed the source files of my blog from the Lino repository, since they are now available from

I worked a bit in An introduction to Lino Così.

Types of Trainings and Studies

In we have two tables TrainingType and StudyType.

And an isip.Contract has a field “Study type” ( study_type).

Now Mathieu asked to add a second field “Training type”. I suggested (and Mathieu confirmed) that we should rather use a common table for these “Study and training types”, and every row of that table would have two checkboxes “training” and “study”.

The last but not least problem is a vocabulary decision to do: what is the best term for designating both trainings and studies? I was hesitating between Schooling, Education and Learning. Finally opted for “Education”:













Excerpt from a site about Training and Study:

If you want to work toward a degree or qualification, it makes sense to choose a study or training programme that suits your personality and your commitments. You can choose how much time you want to commit to your study (full-time or part-time study) and what type of study you want to do (ie practical training or academic learning).

Printing on the demo sites

Printing did not work on the demo sites. To solve (or work around) it, I intalled Python 3 and added the following line to my file:


Updated /admin/oood.

Refugees and their nationality

I added a new field actual_country to the Country model.

In Lino Welfare, the nationality field of a client is a pointer to the table of countries (Country).

And that countries table may contain countries which no longer exist.

Now we discovered that, when a person receives the status of a refugee, she “looses” her former nationality. So we need another type of “fake country”, to be used only in the nationality field and not for example for an address.

Added new tested doc The lino_xl.lib.statbel.countries plugin.

Finding duplicate clients

Gerd and I found a few cases of clients where Lino warns about similar clients, and where we absolutely could not see any similarity. To help us and future users to understand how Lino detects them, we decided to add a possibility to see the phonetic words per client.

Two changes in lino.mixins.dupable.SimilarObjects:

  • The summary panel now also displays the phonetic words when there are similar objects.

  • Discovered that the table did not work when opened in a separate window. Fixed.