Partners¶
This page documents how to use the manager and record objects for partners.
Details¶
Name | Value |
---|---|
Odoo Modules | Base, Product, Sales, OpenStack Integration |
Odoo Model Name | res.partner |
Manager | partners |
Record Type | Partner |
Manager¶
The partner manager is available as the partners
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.partners.get(1234)
Partner(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The partner manager returns Partner
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 is active (enabled).
company_id
¶
The ID for the company this partner is owned by.
company_name
¶
The name of the company this partner is owned by.
company
¶
The company this partner is owned by.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
email
¶
Main e-mail address for the partner.
name
¶
Full name of the partner.
os_customer_group_id
¶
The ID for the customer group this partner is part of, if it is part of one.
os_customer_group_name
¶
The name of the customer group this partner is part of, if it is part of one.
os_customer_group
¶
The customer group this partner is part of, if it is part of one.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
os_project_ids
¶
A list of IDs for the OpenStack projects that belong to this partner.
os_projects
¶
The OpenStack projects that belong to this partner.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
os_project_contact_ids
¶
A list of IDs for the project contacts that are associated with this partner.
os_project_contacts
¶
The project contacts that are associated with this partner.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
os_referral_id
¶
The ID for the referral code the partner used on sign-up, if one was used.
os_referral_name
¶
The name of the referral code the partner used on sign-up, if one was used.
os_referral
¶
The referral code the partner used on sign-up, if one was used.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
os_referral_code_ids
¶
A list of IDs for the referral codes the partner has used.
os_referral_codes
¶
The referral codes the partner has used.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
os_reseller_id
¶
The ID for the reseller for this partner, if this partner is billed through a reseller.
os_reseller_name
¶
The name of the reseller for this partner, if this partner is billed through a reseller.
os_reseller
¶
The reseller for this partner, if this partner is billed through a reseller.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
os_trial_id
¶
The ID for the sign-up trial for this partner, if signed up under a trial.
os_trial_name
¶
The name of the sign-up trial for this partner, if signed up under a trial.
os_trial
¶
The sign-up trial for this partner, if signed up under a trial.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
parent_id
¶
The ID for the parent partner of this partner, if it has a parent.
parent_name
¶
The name of the parent partner of this partner, if it has a parent.
parent
¶
The parent partner of this partner, if it has a parent.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
property_product_pricelist_id
¶
The ID for the pricelist this partner uses, if explicitly set.
If not set, the pricelist set for the customer group is used (and if that is not set, the global default pricelist is used).
property_product_pricelist_name
¶
The name of the pricelist this partner uses, if explicitly set.
If not set, the pricelist set for the customer group is used (and if that is not set, the global default pricelist is used).
property_product_pricelist
¶
The pricelist this partner uses, if explicitly set.
If not set, the pricelist set for the customer group is used (and if that is not set, the global default pricelist is used).
This fetches the full record from Odoo once, and caches it for subsequent accesses.
stripe_customer_id
¶
Stripe customer ID for this partner, if one has been assigned.
user_id
¶
The ID of the internal user associated with this partner, if one is assigned.
user_name
¶
The name of the internal user associated with this partner, if one is assigned.
user
¶
The internal user associated with this partner, if one is assigned.
This fetches the full record from Odoo once, and caches it for subsequent accesses.