account.analytic.line: fields, relations and API
The account.analytic.line model ("Analytic Line") is a persistent model declared by the Analytic Accounting module, then extended by 14 other modules. It exposes 55 fields, 47 of them declared directly on the model; 3 fields from other models point to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 20 JSON-2 API call.
Model identity
- Technical name
account.analytic.line- Label
- Analytic Line
- Type
- Persistent (models.Model)
- SQL table
account_analytic_line- Origin module
- Analytic Accounting (
analytic) - Extended by
- account, sale, project, sale_project, hr_timesheet, mrp_account, project_stock_account, project_mrp_sale, project_sale_expense, project_timesheet_holidays, sale_project_stock, sale_purchase_project, sale_timesheet, website_timesheet
- Default order (_order)
date desc, id desc- Inherits from (mixins)
- analytic.plan.fields.mixin
Model fields
47 own fields, 2 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
55 of 55 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| allow_billable | Allow Billable | boolean | related: added by Sales Timesheet ( |
| allowed_uom_ids | Allowed Uom | many2many→ uom.uom | computed added by Invoicing ( |
| amount | Amount | monetary | required |
| analytic_distribution | Analytic Distribution | json | computed |
| analytic_precision | Analytic Precision | integer | |
| analytic_profitability | Profitability | selection | computed Values: added by Invoicing ( |
| billable_type | Billable Type | selection | read-onlycomputed, stored Values computed at runtime added by Sales - Project ( |
| calendar_display_name | Calendar Display Name | char | computed added by Task Logs ( |
| category | Category | selection | Values: |
| category_report | Category Report | selection | read-onlycomputed, stored Values: added by Sales - Project ( |
| code | Code | char | added by Invoicing ( |
| color | Color | integer | related: added by Task Logs ( |
| commercial_partner_id | Commercial Partner | many2one | computed added by Sales Timesheet ( |
| company_id | Company | many2one | requiredread-only |
| currency_id | Currency | many2one | read-only related: |
| date | Date | date | required |
| department_id | Department | many2one | computed, stored added by Task Logs ( |
| employee_id | Employee Define an 'hourly cost' on the employee to track the cost of their time. | many2one | added by Task Logs ( |
| encoding_uom_id | Encoding Uom | many2one→ uom.uom | computed added by Task Logs ( |
| fiscal_year_search | Fiscal Year Search | boolean | |
| general_account_id | Financial Account | many2one | computed, stored added by Invoicing ( |
| global_leave_id | Global Time Off | many2one | added by Timesheet when on Time Off ( |
| holiday_id | Time Off Request | many2one→ hr.leave | added by Timesheet when on Time Off ( |
| is_so_line_edited | Is Sales Order Item Manually Edited | boolean | added by Sales Timesheet ( |
| job_title | Job Title | char | related: added by Task Logs ( |
| journal_id | Financial Journal | many2one | read-only related: added by Invoicing ( |
| manager_id | Manager | many2one | related: added by Task Logs ( |
| message_partner_ids | Message Partner | many2many | computed added by Task Logs ( |
| milestone_id | Milestone | many2one | related: added by Task Logs ( |
| move_line_id | Journal Item | many2one | added by Invoicing ( |
| name | Description | char | |
| order_id | Customer Order | many2one | computed, stored added by Sales ( |
| parent_task_id | Parent Task | many2one | related: added by Task Logs ( |
| partner_id | Partner | many2one | computed, stored |
| product_category | Product Category | many2one | related: added by Invoicing ( |
| product_id | Product | many2one | computed, stored added by Invoicing ( |
| product_uom_id | Unit | many2one→ uom.uom | computed, stored |
| project_id | Project | many2one | computed, stored added by Task Logs ( |
| readonly_timesheet | Readonly Timesheet | boolean | computed added by Task Logs ( |
| ref | Ref. | char | added by Invoicing ( |
| reinvoice_move_id | Invoice Invoice created from related SO line | many2one | read-only added by Sales ( |
| sale_order_state | Sale Order State | selection | related: added by Sales Timesheet ( |
| sequence | Sequence | integer | added by Task Logs ( |
| so_line | Sales Order Item Sales order item to which the time spent will be added in order to be invoiced to your customer. Remove the sales order item for the timesheet entry to be non-billable. | many2one | computed, stored added by Sales ( |
| task_id | Task | many2one | computed, stored added by Task Logs ( |
| unit_amount | Quantity | float | |
| user_id | User | many2one | computed, stored |
| account_id | Project Account | many2one | inherited from analytic.plan.fields.mixin |
| auto_account_id | Analytic Account | many2one | computed inherited from analytic.plan.fields.mixin |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- account.account: general_account_id
- account.journal: journal_id
- account.move: reinvoice_move_id
- account.move.line: move_line_id
- hr.department: department_id
- hr.employee: employee_id, manager_id
- hr.leave: holiday_id
- product.category: product_category
- product.product: product_id
- project.milestone: milestone_id
- project.project: project_id
- project.task: parent_task_id, task_id
- res.company: company_id
- res.currency: currency_id
- res.partner: commercial_partner_id, message_partner_ids, partner_id
- res.users: user_id
- resource.calendar.leaves: global_leave_id
- sale.order: order_id
- sale.order.line: so_line
- uom.uom: allowed_uom_ids, encoding_uom_id, product_uom_id
Fields of other models pointing here
- mrp.workorder: mo_analytic_account_line_ids, wc_analytic_account_line_ids
- stock.move: analytic_account_line_ids
Reading this model through the API
Odoo 20 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.
curl -X POST "https://your-instance.odoo.com/json/2/account.analytic.line/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","amount","company_id","date","currency_id"],"limit":5}'import requests
BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}
res = requests.post(
f"{BASE_URL}/account.analytic.line/search_read",
headers=headers,
json={"domain": [], "fields": ["name","amount","company_id","date","currency_id"], "limit": 5},
)
res.raise_for_status()
print(res.json())- External API access requires Odoo's Custom plan.
- XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
- The access rights and record rules of the key's user apply.
Cite this tool
Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.
<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/account-analytic-line">account.analytic.line (Odoo 20.0)</a>Sources
Data verified on September 25, 2026 · Odoo 20.0 Community
Have an Odoo project, or want to put your ERP to work with AI? Let's talk
Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.