20140331 (Monday, 31 March 2014)¶
SimilarPersons ready for customer review¶
SimilarPersons has now slave_grid_format = ‘summary’. Fixed a bug in the framework which made that Lino didn’t yet manage this case (setting slave_grid_format to “summary” on a VirtualTable).
The algorithm for finding similar persons isn’t yet very intelligent, but at least we have now an integral workflow to cope with the problem of duplicate new clients. Great! SimilarPersons is ready for customer review.
Aid regimes, Aid helpers¶
Added some new tables in lino_welfare-modlib.aids
. This is my
favourite suggestion about how to store these information. To be
tested and analyzed with end-users.
Checkin.
Also discovered a very subtle pitfall:
When inserting to MedicalAidsByClient and then (in the Insert window) opening the ComboBox for the aid_type field, Lino displayed all AidType objects (also financial ones). This was not correct since get_known_values sets aid_regime to a non-None value.
In fact already the ajax call used to get that choicelist was wrong, it went to /choices/aids/AidsByClient/aid_type instead of /choices/aids/MedicalAidsByClient/aid_type.
This is was solved by a workaround: We define insert_layout on both
subclasses of AidsByClient, not on the base class. This is not
logical since they are the same, but necessary due to the current
implementation of combobox fields. The url from which a combobox field
gets its data is a hard-coded constant in the (generated) JS code. If
you don’t duplicate the insert_layout, then Lino will generate only
one ExtJS definition of the InsertWindow, common to all
subclasses. See lino.ui.elems.ForeignKeyElement
and lino.ui.elems.RemoteComboFieldElement
Note that this trick of using an _aid_regime class attribute
(in lino_welfare.modlib.aids.models.AidsByClient
)
as only
difference between those two tables is rather special. It is also
being used for differentiating between “Studies” and “Trainings”.
Usually I recommend to define two different models (and use an
abstract model mixin for their common parts). But these cases are not
usual.
Thunderbird fails to send message¶
First question: How to have Thunderbird log debug information? Answer: https://wiki.mozilla.org/MailNews:Logging#Other_Protocol_Logging_options_within_MailNews
# For bash shell (the default shell on most GNU/Linux systems):
export NSPR_LOG_MODULES=imap:5
export NSPR_LOG_FILE=/tmp/imap.log