OpenStack Customer Groups¶
This page documents how to use the manager and record objects for customer groups.
Details¶
Name | Value |
---|---|
Odoo Modules | OpenStack Integration |
Odoo Model Name | openstack.customer_group |
Manager | customer_groups |
Record Type | CustomerGroup |
Manager¶
The customer group manager is available as the customer_groups
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.customer_groups.get(1234)
CustomerGroup(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The customer group manager returns CustomerGroup
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.
name
¶
The name of the customer group.
partner_ids
¶
A list of IDs for the partners that are part of this customer group.
partners
¶
The partners that are part of this customer group.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
pricelist_id
¶
The ID for the pricelist this customer group uses, if not the default one.
pricelist_name
¶
The name of the pricelist this customer group uses, if not the default one.
pricelist
¶
The pricelist this customer group uses, if not the default one.
This fetches the full record from Odoo once, and caches it for subsequent accesses.