Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | 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.

This page is a tested document and the following instructions are used for initialization:

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

Overview

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.