20110822¶
a) BabelNamed¶
New mixin lino.utils.babel.BabelNamed
.
Used by
lino.modlib.contacts.models.ContactType
lino.modlib.contacts.models.CompanyType
lino.modlib.countries.models.Language
lino.modlib.countries.models.Country
lino.modlib.notes.models.EventType
lino.modlib.products.models.Category
lino.modlib.products.models.Product
lino.modlib.trading.models.PaymentTerm
lino.modlib.trading.models.InvoicingMode
lino.modlib.trading.models.ShippingMode
lino.modlib.properties.models.PropType
lino.modlib.properties.models.PropGroup
lino.modlib.properties.models.Property
lino_xl.lib.cal.AttendanceRole
lino.modlib.contracts.models.ContractType
lino.modlib.contracts.models.ExamPolicy
lino.apps.dsbe.models.StudyType
lino.apps.dsbe.models.AidType
This removes a lot of code redundance without modifying the database structure.
Checkin 20110822a
b) Changes in lino.modlib.contacts
¶
I opened docs/tickets/48.
A few changes in the database structure, but a big step in Lino’s evolution: Persons & Companies get a common non-abstract model Contact. This change is triggered by our need for a user-friendly way to add recipients to an OutMail. A Contact will be “a Company, a Person, a User or a Group of Contacts”.
The current model ContactType gets renamed to Role.
The current model Contact gets renamed to RoleOccurence.
The current model Addressable gets renamed to Contact and becomes concrete.
This is the first time that we have more than one level of multi-table inheritance:
Contact –> Company –> CourseProvider
This caused to some design decisions about loading .dtl files and the default app_label of a Report:
the app_label of a Report is always taken from the model. Subclasses cannot set it manually.
.dtl files now override each other by their name. For example if Lino finds a file 1.dtl for each of Contact, Company and CourseProvider, then CourseProvider uses only its own version of that detail.
Checkin 20110822b