20130325 (Monday, 25 March 2013)¶
A lino_welfare.modlib.debts.models.Budget
now has two new
checkbox fields print_empty_rows
and
ignore_yearly_incomes
.
Discovered and fixed a few little aftermaths of the conversion to babel.
For example the string “Working” is translated differently in
lino.modlib.tickets.models
than in
lino_welfare.modlib.jobs.models
.
Or the difference between a Designation (“Bezeichnung”)
and a Description (“Beschreibung”).
ActionRunner¶
An internal syntactical optimization:
lino.core.actions.Action
now has a descriptor (a __get__ method)
which returns an
ActionRunner
.
Result:
I can now execute actions more easily from Python code.
I use this to write tested documents
like Debts mediation
or the new test case
lino_welfare.tests.pcsw_tests.test10()
.
Internally I splitted Action.run into two parts: run_from_ui and run_from_code. run_from_code can return an action-specific value, e.g. obj.duplicate() will return new newly created object.