Thursday, October 22, 2020¶
The getlino test suite now also tries to install a voga application. And this
failed. The pm prep
on the newly created site said:
lino_xl.lib.accounting.models.DoesNotExist:
Problem installing fixture '/usr/local/lino/lino_local/voga1/env/lib/python3.7/site-packages/lino_xl/lib/finan/fixtures/payments.py':
Journal matching query does not exist.
I reproduced this problem in the book by adding a new demo project
lino_book.projects.voga1
.
Explanation: the minimal_ledger
in lino_xl.lib.accounting
created
certain journals (SLC, PRC, PMO, …) only when
lino_xl.lib.vat.Plugin.declaration_plugin
was set. And there is no
default value for this setting.
An empty declaration_plugin
is used e.g. in
lino_book.projects.cosi2
, which is an example of a freelancer who uses
Lino to just write invoices and has accounting done by an external expert.
Should getlino ask (or provide a default value) for it? No. The solution is much easier:
Adapted the
payments
fixture oflino_xl.lib.accounting
to also work whendeclaration_plugin
is empty.Fixing this revealed a secondary bug: the
get_installed_plugins()
of thelino_voga.lib.voga.settings.Site
was yielding thelino_xl.lib.bevats
plugin, this is done automatically whendeclaration_plugin
is set.