Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
ibanity
in Noi¶
This document explains how the lino_xl.lib.ibanity
plugin is used in Lino
Noi.
Note
Code snippets in this document (lines starting with >>>
) get tested
as part of our development workflow. The following
initialization snippet tells you which demo project is being used.
>>> from lino_book.projects.noi1r.startup import *
The tests in this document are skipped unless you also have Ibanity credentials installed. See How to set up your credentials for details.
>>> if not dd.plugins.ibanity.credentials:
... pytest.skip('this doctest requires Ibanity credentials')
Clean up from (incomplete) previous test runs:
>>> def tidy_up():
... ibanity.Supplier.objects.all().delete()
... countries.Place.objects.filter(name="Leuven").delete()
>>> tidy_up()
Onboarding states¶
>>> rt.show(ibanity.OnboardingStates)
======= ============ ============
value name text
------- ------------ ------------
10 draft Draft
20 created Created
30 approved Approved
40 rejected Rejected
50 onboarded Onboarded
60 offboarded Offboarded
======= ============ ============
Suppliers¶
>>> ar = rt.login("robin")
>>> rt.show(ibanity.Suppliers)
No data to display
>>> ibanity.SuppliersListChecker.update_unbound_problems(ar, fix=True)
- ibanity.SuppliersListChecker : (★) No entry for 273c1bdf-6258-4484-b6fb-74363721d51f.
(★) Unknown city Leuven ((in Belgium)
(★) Some fields need update: city, country, email, ibans, names, onboarding_state, phone, street, street_no, vat_id, zip_code
Found 0 and fixed 1 checkdata messages for ibanity.SuppliersListChecker (Check for missing or invalid suppliers).
>>> rt.show(ibanity.Suppliers)
====================================== ======================= ============== ================== ==================================
Supplier ID Names VAT id Onboarding state Last sync
-------------------------------------- ----------------------- -------------- ------------------ ----------------------------------
273c1bdf-6258-4484-b6fb-74363721d51f Company; Company S.A. BE1234567890 Created ...
====================================== ======================= ============== ================== ==================================
Clean up after this test run:
>>> tidy_up()