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

Contacts

This document explains the lino_tera.lib.contacts plugin, a customized version of the lino_xl.lib.contacts plugin.

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.tera1.startup import *

The Tera version of contacts extends the lino_xl.lib.contacts.Person class.

>>> dd.plugins.contacts
<lino_tera.lib.contacts.Plugin lino_tera.lib.contacts(needs ['lino_xl.lib.countries', 'lino.modlib.system'])>
>>> dd.plugins.contacts.extends_models
['Person']

Types of partners

Lino Tera defines two additional partner types.

>>> print([fmn(m) for m in rt.models_by_base(rt.models.contacts.Partner)])
['contacts.Company', 'contacts.Partner', 'contacts.Person', 'households.Household', 'tera.Client']
digraph foo {
  "Partner" -> "Organization"
  "Partner" -> "Person"
  "Person" -> "Patient"
  "Partner" -> "Household"
}
class lino_tera.lib.contacts.Partner
pf_residence

The residence used to determine the fee for invoicing.

>>> rt.show(courses.Residences)
======= ======== =========
 value   name     text
------- -------- ---------
 10      inside   Inside
 20      ouside   Outside
======= ======== =========
pf_income

The income category used to determine the fee for invoicing.

>>> rt.show(courses.IncomeCategories)
======= ====== ======
 value   name   text
------- ------ ------
 10             A
 20             B
 30             C
 40             D
 50             E
======= ====== ======
pf_composition

The family composition used to determine the fee for invoicing.

>>> rt.show(courses.HouseholdCompositions)
======= =============== ====================================
 value   name            text
------- --------------- ------------------------------------
 10      no_child        No participant below 18
 20      one_child       One participant below 18
 30      more_children   More than one participant below 18
======= =============== ====================================