Taxes¶
This page documents how to use the manager and record objects for taxes.
Details¶
| Name | Value | 
|---|---|
| Odoo Modules | Accounting | 
| Odoo Model Name | account.tax | 
| Manager | taxes | 
| Record Type | Tax | 
Manager¶
The tax manager is available as the taxes
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.taxes.get(1234)
Tax(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The tax manager returns Tax 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 tax is active (enabled).
amount¶
The amount of tax to apply.
amount_type¶
The method that should be used to tax invoices.
Values:
group- Group of Taxesfixed- Fixedpercent- Percentage of Pricedivision- Percentage of Price Tax Included
analytic¶
When set to True, the amount computed by this tax will be assigned
to the same analytic account as the invoice line (if any).
company_id¶
The ID for the company this tax is owned by.
company_name¶
The name of the company this tax is owned by.
company¶
The company this tax is owned by.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
country_code¶
The country code for this tax.
description¶
The label for this tax on invoices.
include_base_amount¶
When set to True, taxes included after this one will be calculated
based on the price with this tax included.
name¶
Name of the tax.
price_include¶
Whether or not prices included in invoices should include this tax.
tax_eligibility¶
When the tax is due for the invoice.
Values:
on_invoice- Due as soon as the invoice is validatedon_payment- Due as soon as payment of the invoice is received
tax_group_id¶
The ID for the tax group this tax is categorised under.
tax_group_name¶
The name of the tax group this tax is categorised under.
tax_group¶
The tax group this tax is categorised under.
This fetches the full record from Odoo once, and caches it for subsequent accesses.