Monday, October 10, 2016

Moving from AGPL to BSD

I worked for ticket #1213 (Change license of applications from AGPL to BSD) and switched Lino Extensions Library and Lino Noi from AGPL to BSD. This is another step in our general move from AGPL to BSD. Lino itself (the core and the book) were already BSD licensed.

TODO: Note that Lino Così, Lino Voga, Lino Presto and Lino Welfare must remain under AGPL because of the lino_xl.lib.b2c.camt module which was originally copied from Odoo. We should maybe move this module from Lino Così to Lino Welfare some day so that Lino Così, Lino Voga and Lino Presto can become BSD as well.

An example of permission management à la Lino

Ticket #1214 is an example to illustrate Introduction to permissions.

The contracts tab of lino_welfare.projects.eupen.modlib.pcsw.models.ClientDetail is defined as follows:

contracts = dd.Panel("""
""", label=_("Contracts"))

Exercise: find the definitions of these tables, and which is their lino.core.permissions.Permittable.required_roles.

Basically I just replaced IntegrationAgent by SocialAgent for certain tables.

The Lino Welfare “Eupen” variant Clients (Eupen) The Lino Welfare “Châtelet” variant

This ticket reveals that the DebtsUser role (Debt mediation agent) currently inherits from SocialAgent, and that this is maybe not what they want. I guess that the customer does not want the Contracts panel to become visible also for DebtsUser. But I am not sure. I must ask them.

Hide calendar events before a configurable date

Alexa and Monique will soon start with scheduling their events for 2017. That’s why they asked (or we decided that they want) that EventsByCourse should show only the events within a configurable date range. In a first step I think that we don’t want a date range but just a single global configurable date labeled “Hide calendar events before”. This is ticket #1202.

They asked it only for EventsByCourse, but I am tempted to say they other people will also want such a feature.

  • now injects a field hide_events_before to their SiteConfig.

  • The Events table (and therefore all tables of calendar events which don’t set this value themselves) now sets its start_date to the value given by this SiteConfig field.

  • I adapted the detail_layout for SiteConfig of Lino Voga.

This was for the change itself.

Then I had to decide how to test the new fixture. The obvious way is to set a non-empty value for this field in some demo database and to see whether it is being taken into account. This is now done in the fixture, i.e. for all applications which use As expected, this caused changes in the test suites of several projects (not only Lino Voga but also Lino Welfare, Lino Così and Developer Guide).