20131007 (Monday, 07 October 2013)

Issuing payment reminders

Continued on Renamed “Lino Faggio” to “Lino Voga”: Lino can now issue payment reminders. In its simplest form (just a reminder, without automatically computing a severeness and/or interests to add) the user simply creates a Note of type “Payment Reminder” and prints it or sends it via email. I like the straightforwardness and transparence of this implementation which will be part of Lino Così.

Added an insert_layout to notes.NoteTypes.

Added notes.NotesByPerson and notes.NotesByCompany.

New files Letter.odt and payment_reminder.body.html. A payment reminder uses the ledger.DuePaymentsByPartner table with the Note’s partner property as master_instance.

lino.modlib.ledger.fixtures.mini now adds a NoteType “Payment reminder”.

Should ar.show() call E.tostring() or not? Answer: it depends. Yes when called from inside a “do text from” of an appy.pod template, No when called from inside a plain html template.

  • lino.core.requests.BaseRequest.show()

  • lino.ui.render.HtmlRenderer.show_request()

  • lino.ui.render.TextRenderer.show_request()

  • lino.extjs.ext_renderer.ExtRenderer.show_request()

  • lino.core.actors.Actor.show()

Cannot choose template or body_template of a PrintableType

When trying to choose a template or body_template of a PrintableType, the selection list is always empty and the server reports a TypeError “unbound method get_templates_group() must be called with NoteType instance as first argument (got nothing instead)”.

This bug had been introduced when I made ledger.Journal a PrintableType. Fixing this bug revealed two other bugs:

  • Lino didn’t yet support specifying a ChoiceListField as parameter of a Chooser. Fixed. Added lino.utils.instantiator.ChoiceConverter.

  • Until now it was not possible to select per Journal another template than Default.odt for printing an invoice. Fixed.

Released Lino-Welfare 1.1.10

Release notes see Changes. This also required a new version (1.6.13) of Lino.

fab sdist_test still failed with an ImportError “Could not import settings ‘lino.projects.belref.settings’ (Is it on sys.path?): No module named lino_welfare.modlib.statbel”

fab sdist_test no longer asks for a user confirmation before deleting the temporary directory.

Renamed the fab command upload to fab release.

Upgrading to a relased version is now really easy:

$ . env/bin/activate $ python manage.py dump2py /var/log/lino/backups/20131007 $ pip install -U lino-welfare $ python manage.py run /var/log/lino/backups/20131007

Oops, except if you get e.g. the following:

IOError: [Errno 28] No space left on device

which means that you must either tidy up or install a bigger hard drive.