Monday, September 4, 2017

Miscellaneous optimizations in Lino Tera

Working for #2033.

I added spacer columns to AccountsBalance (i.e. to all three reports). It required a few minor changes in the core:

  • I added a constant ALLOW_DUPLICATE_ELEMS in lino.core.layouts which causes Lino to not complain about “Duplicate element usage” within a layout.
  • Support empty column heading. If you don’t sepecify any label, then Lino uses the field name as before. But if you specify an empty string as label, then it remains empty. Also changed FieldElement.get_column_options() in both extjs versions.

Lydia and I realized that some journals use number_with_year while others use number. We agreed that it should be number_with_year everywhere because the numbers without year would become useless as soon as there is more than one accounting year. TODO: make the number_with_year column sortable.

The ItemsByInvoice label in Lino Tera was rather irritatingly labelled “Analytische Rechnungspositionen”. New table mixin lino_xl.lib.ledger.ItemsByVoucher which sets also the label to “Content”.

We thought that it might be good to disable the phantom row in the journals tables, i.e. to allow creation of new rows only using the (+) button. I then realized that this is actually true for most tables. More exactly for all tables that have stay_in_grid set to False. This is handled by lino.core.requests.ActorRequest.create_phantom_rows().