Partner Categories¶
This page documents how to use the manager and record objects for partner categories.
Details¶
| Name | Value | 
|---|---|
| Odoo Modules | Base | 
| Odoo Model Name | res.partner.category | 
| Manager | partner_categories | 
| Record Type | PartnerCategory | 
Manager¶
The partner category manager is available as the partner_categories
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.partner_categories.get(1234)
PartnerCategory(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The partner category manager returns PartnerCategory 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 partner category is active (enabled).
child_ids¶
A list of IDs for the child categories.
children¶
The list of child categories.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
color¶
Colour index for the partner category.
colour¶
Alias for color.
name¶
The name of the partner category.
parent_id¶
The ID for the parent partner category, if this category is the child of another category.
parent_name¶
The name of the parent partner category, if this category is the child of another category.
parent¶
The parent partner category, if this category is the child of another category.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
parent_path¶
The path of the parent partner category, if there is a parent.
partner_ids¶
A list of IDs for the partners in this category.
partners¶
The list of partners in this category.
This fetches the full records from Odoo once, and caches them for subsequent accesses.