OpenStack Credit Transactions¶
This page documents how to use the manager and record objects for credit transactions.
Details¶
| Name | Value | 
|---|---|
| Odoo Modules | OpenStack Integration | 
| Odoo Model Name | openstack.credit.transaction | 
| Manager | credit_transactions | 
| Record Type | CreditTransaction | 
Manager¶
The credit transaction manager is available as the credit_transactions
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.credit_transactions.get(1234)
CreditTransaction(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The credit transaction manager returns CreditTransaction 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.
credit_id¶
The ID of the credit this transaction was made against.
credit_name¶
The name of the credit this transaction was made against.
credit¶
The credit this transaction was made against.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
description¶
A description of this credit transaction.
value¶
The value of the credit transaction.