========================= Tuesday, December 8, 2015 ========================= Matching invoices and payments ============================== Uff, I finally fixed the main problem of :ticket:`625`. This ticket was introduced by my hesitations about whether the match :attr:`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. DONE: - 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 :mod:`lino_xl.lib.trading.fixtures.demo`. In `std` we have the sales invoices generated by :mod:`lino_xl.lib.ledger.fixtures.demo_bookings`. Why does `std` not have both sets of invoices? A funny reason for getting :message:`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 :xfile:`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:: {u'lino_cosi.lib.cosi': [u'lino_cosi/lib/cosi/locale/de/LC_MESSAGES/*.mo', u'lino_cosi/lib/cosi/locale/fr/LC_MESSAGES/*.mo']} Note that :attr:`env.locale_dir ` in the projects :xfile:`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.