Module s.d.person

Part of stoqlib.domain

Person domain classes

The Person domain classes in Stoqlib are special since the normal Person class is very small and additional functionality is provided through facets (adapters).

There are currently the following Person facets available:

To create a new person, just issue the following:

>>> from stoqlib.database.runtime import new_transaction
>>> trans = new_transaction()
>>> person = Person(name="A new person", connection=trans)

To assign a new role to a person, use addFacet method, for instance to make a person into a company:

>>> person.addFacet(ICompany, connection=trans)

The company facet provides additional persistent information related to companies, see stoqlib.domain.interfaces.IClient for more information

To access the facet, do:

>>> company = ICompany(person)

See stoqlib.lib.component for more information on adapters.

Class EmployeeRole Base class to store the employee roles.
Class WorkPermitData Work permit data for employees.
Class MilitaryData Military data for employees. This is Brazil-specific
Class VoterData Voter data for employees. This is Brazil-specific information.
Class Liaison Base class to store the person's contact informations.
Class Calls Person's calls information.
Class Person Base class to register persons in the system. This class should never
Class PersonAdapter Undocumented
Class PersonAdaptToIndividual An individual facet of a person.
Class PersonAdaptToCompany A company facet of a person.
Class PersonAdaptToClient A client facet of a person.
Class PersonAdaptToSupplier A supplier facet of a person.
Class PersonAdaptToEmployee An employee facet of a person.
Class PersonAdaptToUser An user facet of a person.
Class PersonAdaptToBranch A branch facet of a person.
Class PersonAdaptToBankBranch A bank branch facet of a person.
Class PersonAdaptToCreditProvider A credit provider facet of a person.
Class PersonAdaptToSalesPerson A sales person facet of a person.
Class PersonAdaptToTransporter A transporter facet of a person.
Class EmployeeRoleHistory Base class to store the employee role history.
Class ClientView Stores information about clients.
Class EmployeeView No class docstring; 1/1 class methods, 0/2 methods documented
Class SupplierView Undocumented
Class TransporterView Stores information about transporters
Class BranchView Undocumented
Class CreditProviderView Undocumented
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.