OpenStack Reseller Tiers¶
This page documents how to use the manager and record objects for reseller tiers.
Details¶
Name | Value |
---|---|
Odoo Modules | OpenStack Integration |
Odoo Model Name | openstack.reseller.tier |
Manager | reseller_tiers |
Record Type | ResellerTier |
Manager¶
The reseller tier manager is available as the reseller_tiers
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.reseller_tiers.get(1234)
ResellerTier(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The reseller tier manager returns ResellerTier
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.
discount_percent
¶
The maximum discount percentage for this reseller tier (0-100).
discount_product_id
¶
The ID of the discount product for the reseller tier.
discount_product_name
¶
The name of the discount product for the reseller tier.
discount_product
¶
The discount product for the reseller tier.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
free_monthly_credit
¶
The amount the reseller gets monthly in credit for demo projects.
free_monthly_credit_product_id
¶
The ID of the product to use when adding the free monthly credit to demo project invoices.
free_monthly_credit_product_name
¶
The name of the product to use when adding the free monthly credit to demo project invoices.
free_monthly_credit_product
¶
The product to use when adding the free monthly credit to demo project invoices.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
free_support_hours
¶
The amount of free support hours the reseller is entitled to under this tier.
name
¶
Reseller tier name.
name
¶
The minimum required usage amount for the reseller tier.