Users¶
This page documents how to use the manager and record objects for users.
Details¶
| Name | Value |
|---|---|
| Odoo Modules | Base, Accounting |
| Odoo Model Name | res.users |
| Manager | users |
| Record Type | User |
Manager¶
The user manager is available as the users
attribute on the Odoo client object.
>>> from openstack_odooclient import Client as OdooClient
>>> odoo_client = OdooClient(
... hostname="localhost",
... port=8069,
... protocol="jsonrpc",
... database="odoodb",
... user="test-user",
... password="<password>",
... )
>>> odoo_client.users.get(1234)
User(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The user manager returns User record objects.
To import the record class for type hinting purposes:
The record class currently implements the following fields and methods.
For more information on attributes and methods common to all record types, see Record Attributes and Methods.
active¶
Whether or not this user is active (enabled).
active_partner¶
Whether or not the partner this user is associated with is active.
company_id¶
The ID for the default company this user is logged in as.
company_name¶
The name of the default company this user is logged in as.
company¶
The default company this user is logged in as.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
name¶
User name.
partner_id¶
The ID for the partner that this user is associated with.
partner_name¶
The name of the partner that this user is associated with.
partner¶
The partner that this user is associated with.
This fetches the full record from Odoo once, and caches it for subsequent accesses.