Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
assets
: Partner assets¶
This is the developer reference about the lino_xl.lib.assets
plugin,
which adds functionality for managing partner assets.
This page contains code snippets (lines starting with >>>
), which are
being tested during our development workflow. The following
snippet initializes the demo project used throughout this page.
>>> from lino_book.projects.cosi3.startup import *
>>> ses = rt.login('robin')
Partner assets¶
- partner asset¶
A reference name that’s important for a given business partner so that they ask me to mention it when sending them invoices.
The partner asset model is used as
lino_xl.lib.invoicing.order_model
in lino_book.projects.cosi3
.
Configuration options¶
In Lino Così you can activate this plugin by setting the
lino_cosi.lib.cosi.settings.Site.with_assets
option. In other
applications you add it to your get_installed_plugins()
method.
>>> settings.SITE.with_assets
True
In cosi3 we also customize the verbose name of the partner asset. The end users of this site don’t think about “Partner assets” but about “License plates”.
>>> dd.plugins.assets.asset_name
'License plate'
>>> dd.plugins.assets.asset_name_plural
'License plates'
>>> dd.plugins.assets.asset_name_short
'Plate'
Usage¶
When this plugin is installed, the lino_xl.lib.trading.InvoiceItem.asset
field is no longer a dummy field but a learning combo.
You can specify the partner asset for every line of an invoice.
As a site manager you can see all partner assets by selecting .
>>> show_menu_path(assets.PartnerAssets)
Explorer --> Partner assets --> License plates
>>> rt.show(assets.PartnerAssets)
===================== ========
Partner Plate
--------------------- --------
Bestbank ABC123
Rumma & Ko OÜ ABC456
Bäckerei Ausdemwald DEF123
Bäckerei Mießen DEF789
===================== ========