Account Moves (Invoices)¶
This page documents how to use the manager and record objects for account moves (invoices).
Details¶
Name | Value |
---|---|
Odoo Modules | Accounting, OpenStack Integration |
Odoo Model Name | account.move |
Manager | account_moves |
Record Type | AccountMove |
Manager¶
The account move (invoice) manager is available as the account_moves
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.account_moves.get(1234)
AccountMove(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
The following manager methods are also available, in addition to the standard methods.
action_post
¶
Change one or more draft account moves (invoices) into "posted" state.
This method accepts either a record object or ID, or an iterable of either of those types. Multiple positional arguments are allowed.
All specified records will be processed in a single request.
Parameters¶
Name | Type | Description | Default |
---|---|---|---|
*account_moves |
int | AccountMove | Iterable[int | AccountMove] |
Record objects, IDs, or record/ID iterables | (required) |
send_openstack_invoice_email
¶
send_openstack_invoice_email(
account_move: int | AccountMove,
email_ctx: Optional[Mapping[str, Any]] = None,
) -> None
Send an OpenStack invoice email for the given account move (invoice).
Parameters¶
Name | Type | Description | Default |
---|---|---|---|
account_move |
int | AccountMove |
The account move (invoice) to send an email for | (required) |
email_ctx |
Mapping[str, Any] | None |
Optional email context | None |
Record¶
The account move (invoice) manager returns AccountMove
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.
amount_total
¶
Total (taxed) amount charged on the account move (invoice).
amount_untaxed
¶
Total (untaxed) amount charged on the account move (invoice).
currency_id
¶
The ID for the currency used in this account move (invoice).
currency_name
¶
The name of the currency used in this account move (invoice).
currency
¶
The currency used in this account move (invoice).
This fetches the full record from Odoo once, and caches it for subsequent accesses.
invoice_date
¶
The invoicing date for the account move (invoice).
invoice_date_due
¶
The due date that the account move (invoice) must be paid by.
invoice_line_ids
¶
The list of the IDs for the account move (invoice) lines that comprise this account move (invoice).
invoice_lines
¶
A list of account move (invoice) lines that comprise this account move (invoice).
This fetches the full records from Odoo once, and caches them for subsequent accesses.
is_move_sent
¶
Whether or not the account move (invoice) has been sent.
move_type
¶
move_type: Literal[
"entry",
"out_invoice",
"out_refund",
"in_invoice",
"in_refund",
"out_receipt",
"in_receipt",
]
The type of account move (invoice).
Values:
entry
- Journal Entryout_invoice
- Customer Invoiceout_refund
- Customer Credit Notein_invoice
- Vendor Billin_refund
- Vendor Credit Noteout_receipt
- Sales Receiptin_receipt
- Purchase Receipt
name
¶
Name assigned to the account move (invoice), if posted.
os_project_id
¶
The ID of the OpenStack project this account move (invoice) was generated for, if this is an invoice for OpenStack project usage.
os_project_name
¶
The name of the OpenStack project this account move (invoice) was generated for, if this is an invoice for OpenStack project usage.
os_project
¶
The OpenStack project this account move (invoice) was generated for, if this is an invoice for OpenStack project usage.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
payment_state
¶
payment_state: Literal[
"not_paid",
"in_payment",
"paid",
"partial",
"reversed",
"invoicing_legacy",
]
The current payment state of the account move (invoice).
Values:
not_paid
- Not Paidin_payment
- In Paymentpaid
- Paidpartial
- Partially Paidreversed
- Reversedinvoicing_legacy
- Invoicing App Legacy
state¶
The current state of the account move (invoice).
Values:
draft
- Draft invoiceposted
- Posted (finalised) invoicecancel
- Cancelled invoice
action_post
¶
Change this draft account move (invoice) into "posted" state.
send_openstack_invoice_email
¶
Send an OpenStack invoice email for this account move (invoice).
Parameters¶
Name | Type | Description | Default |
---|---|---|---|
email_ctx |
Mapping[str, Any] | None |
Optional email context | None |