lino_xl.lib.reception.models

The models.py file for lino_xl.lib.reception.

This injects three fields to cal.Guest and defines three new states in cal.GuestStates.

state ---action--> new state

present ---checkin--> waiting waiting ---receive--> busy busy ---checkout--> gone

What

waiting_since

busy_since

gone_since

Visitor checks in

X

Agent receives the visitor

X

X

Visitor leaves

X

X

X

(This module's source code is available here.)

Functions

beware(sender[, instance])

checkout_guest(obj, ar)

Check a guest out.

create_prompt_event(project, partner, user, ...)

Create a "prompt event".

Classes

AppointmentsByPartner(*args, **kw)

Show the participations in upcoming calendar events for a given partner.

BusyVisitors(*args, **kw)

Show busy visitors (with any user).

CheckinVisitor([label])

Mark this visitor as arrived.

CheckoutVisitor([label])

The "Checkout" action on a Guest.

ExpectedGuests(*args, **kw)

General table of all expected guests.

GoneVisitors(*args, **kw)

Show gone visitors (for any user).

MyBusyVisitors(*args, **kw)

Show the visitors with whom I am busy.

MyGoneVisitors(*args, **kw)

Show my visitors who have gone.

MyVisitorAction([label])

MyWaitingVisitors(*args, **kw)

Show visitors waiting for me.

ReceiveVisitor([label])

The "Receive" action on a Guest.

Visitors(*args, **kw)

Common base class for the following tables:

WaitingVisitors(*args, **kw)

Show waiting visitors (for any user).

lino_xl.lib.reception.models.create_prompt_event(project, partner, user, summary, guest_role, now=None)

Create a "prompt event".

class lino_xl.lib.reception.models.CheckinVisitor(label=None, **kwargs)

Bases: lino.modlib.notify.actions.NotifyingAction

Mark this visitor as arrived.

To be called on a Guest object.

get_notify_recipients(ar, obj)

Yield a list of users to be notified.

class lino_xl.lib.reception.models.ReceiveVisitor(label=None, **kwargs)

Bases: lino_xl.lib.reception.models.MyVisitorAction

The "Receive" action on a Guest.

lino_xl.lib.reception.models.checkout_guest(obj, ar)

Check a guest out. This sets the gone_since timestamp to now and the state to gone.

If busy_since is empty, set it to gone_since.

If the related event has no end_time, also set this.

class lino_xl.lib.reception.models.CheckoutVisitor(label=None, **kwargs)

Bases: lino_xl.lib.reception.models.MyVisitorAction

The "Checkout" action on a Guest.

class lino_xl.lib.reception.models.AppointmentsByPartner(*args, **kw)

Bases: lino.core.dbtables.Table

Show the participations in upcoming calendar events for a given partner.

TODO: rename this to GuestsByPartner or ParticipationsByPartner and add filter parameters.

model

alias of lino_xl.lib.cal.models.Guest

master

alias of lino_xl.lib.contacts.models.Person

class lino_xl.lib.reception.models.ExpectedGuests(*args, **kw)

Bases: lino_xl.lib.cal.ui.Guests

General table of all expected guests.

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.Visitors(*args, **kw)

Bases: lino_xl.lib.cal.ui.Guests

Common base class for the following tables:

WaitingVisitors

MyWaitingVisitors

BusyVisitors

MyBusyVisitors

GoneVisitors

MyGoneVisitors

No subclass should be editable because deleting would leave the useless cal.Event.

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.BusyVisitors(*args, **kw)

Bases: lino_xl.lib.reception.models.Visitors

Show busy visitors (with any user).

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.WaitingVisitors(*args, **kw)

Bases: lino_xl.lib.reception.models.Visitors

Show waiting visitors (for any user).

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.GoneVisitors(*args, **kw)

Bases: lino_xl.lib.reception.models.Visitors

Show gone visitors (for any user).

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.MyWaitingVisitors(*args, **kw)

Bases: lino.modlib.users.mixins.My, lino_xl.lib.reception.models.WaitingVisitors

Show visitors waiting for me.

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.MyBusyVisitors(*args, **kw)

Bases: lino.modlib.users.mixins.My, lino_xl.lib.reception.models.BusyVisitors

Show the visitors with whom I am busy.

model

alias of lino_xl.lib.cal.models.Guest

class lino_xl.lib.reception.models.MyGoneVisitors(*args, **kw)

Bases: lino.modlib.users.mixins.My, lino_xl.lib.reception.models.GoneVisitors

Show my visitors who have gone.

model

alias of lino_xl.lib.cal.models.Guest