Tuesday, December 8, 2015

Matching invoices and payments

Uff, I finally fixed the main problem of #625. This ticket was introduced by my hesitations about whether the match match field of a ledger movement should be (1) a pointer to another movement or (2) a CharField which gives an arbitrary name to a group of movements. It currently seems that my hesitation is over and that (2) is the right solution.


  • demo_bookings failed to generate content of payment orders because purchase invoice did not report their bank_account (ordering of parent classes is important: Payable must come before Voucher)

  • The MovementsByPartner table no says “No uncleared movements” instead of “No data to display”.

  • Is it correct that the dates of payments are not set when filled? Yes, Lino cannot guess them.

There are still some details to fix before it makes sense to record a tour of screenshots:

  • a new action per FinancialVoucherItem which opens a SuggestionsByFinancialVoucherItem, alsmost similar to ShowSuggestions, but which adds the partner of that item to the filter.

  • The MovementsByPartner table does not show the balance in case of partial payment.

  • in apc we have the sales invoices generated by lino_xl.lib.sales.fixtures.demo. In std we have the sales invoices generated by lino_xl.lib.ledger.fixtures.demo_bookings. Why does std not have both sets of invoices?

A funny reason for getting package_data must be a dictionary ...

I was surprised by the folllowing error message:

$ fab test
error in lino-cosi setup command: package_data must be a dictionary mapping package names to lists of wildcard patterns

The reason was that I had added a from __future__ import unicode_literals line in the setup_info.py. The error message came because some Python code expects binary strings and ignores unicode strings. So the content of my package_data was:


Note that env.locale_dir in the projects fabfile.py must point to the locale directory of the project. My approach is to have only one locale directory per project. This part is not well documented.