Bases: object
Container for the OpenERP transactional stuff:
The OpenERP Cursor
The User ID as integer
Context Manager: shallow copy the context, update it with values, then restore the original context on closing.
Parameters: | values (dict) – values to apply on the context |
---|
Context Manager: temporarily change the user’s session and restablish the normal user at closing,
Indicates whether a module is installed or not on the current database.
Use a convention established for the connectors addons: To know if a module is installed, it looks if an (abstract) model with name module_name.installed is loaded in the registry.
Bases: object
Allow to create a new instance of ConnectorSession for a database.
The name of the database we’re working on
The User ID as integer
The current OpenERP’s context
Usage:
session_hdl = ConnectorSessionHandler(db_name, 1)
with session_hdl.session() as session:
# work with session