Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

How Lino Così generates invoices

In Lino Così every delivered item will get invoiced.

General functionality for automatically generating invoices is documented in invoicing : Generating invoices.

Lines starting with >>> in this document are code snippets that get tested as part of our development workflow.

>>> from lino import startup
>>> startup('lino_book.projects.cosi5.settings')
>>> from lino.api.doctest import *


The invoice generator is is sales.InvoiceItem

>>> rt.models_by_base(rt.models.invoicing.InvoiceGenerator)
[<class 'lino_xl.lib.trading.models.InvoiceItem'>]

We must explain to Lino how a delivery note turns into an invoice by extending the models so that they inherit from InvoiceGenerator.