sale.order.template.line: fields, relations and API
The sale.order.template.line model ("Quotation Template Line") is a persistent model declared by the Sales module, then extended by 2 other modules. It exposes 32 fields, 26 of them declared directly on the model; 2 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
sale.order.template.line- Label
- Quotation Template Line
- Type
- Persistent (models.Model)
- SQL table
sale_order_template_line- Origin module
- Sales (
sale_management) - Extended by
- sale_project, sale_margin
- Default order (_order)
sale_order_template_id, sequence, id- Inherits from (mixins)
- product.catalog.line.mixin
Model fields
26 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
32 of 32 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| allowed_uom_ids | Allowed Uom | many2many→ uom.uom | computed |
| collapse_composition | Collapse Composition | boolean | |
| collapse_prices | Collapse Prices | boolean | |
| company_id | Company | many2one | related: |
| discount | Discount (%) | float | |
| display_type | Display Type | selection | Values: |
| is_configurable_product | Is the product configurable? | boolean | related: |
| is_optional | Optional Line | boolean | |
| label | Label | text | computed |
| mandatory_product | Is Product Mandatory | boolean | computed |
| name | Description | text | computed, storedtranslatable |
| parent_id | Parent Section Line | many2one | computed |
| price_unit | Unit Price | float | |
| product_custom_attribute_value_ids | Custom Values | one2many | computed, stored inverse: |
| product_id | Product | many2one | |
| product_no_variant_attribute_value_ids | Extra Values | many2many | computed, stored |
| product_template_attribute_value_ids | Product Template Attribute Value | many2many | related: |
| product_template_id | Product Template | many2one | computed |
| product_uom_id | Unit | many2one→ uom.uom | computed, stored |
| product_uom_qty | Quantity | float | required |
| purchase_price | Unit Cost | float | added by Margins in Sales Orders ( |
| sale_order_template_id | Quotation Template Reference | many2one | required |
| section_qty | Section Quantity | float | computed, stored |
| section_uom_id | Section Unit of Measure | many2one→ uom.uom | computed, stored |
| sequence | Sequence Gives the sequence order when displaying a list of sale quote lines. | integer | |
| tax_ids | Taxes | many2many | |
| 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.tax: tax_ids
- product.attribute.custom.value: product_custom_attribute_value_ids
- product.product: product_id
- product.template: product_template_id
- product.template.attribute.value: product_no_variant_attribute_value_ids, product_template_attribute_value_ids
- res.company: company_id
- sale.order.template: sale_order_template_id
- sale.order.template.line: parent_id
- uom.uom: allowed_uom_ids, product_uom_id, section_uom_id
Fields of other models pointing here
- product.attribute.custom.value: sale_order_template_line_id
- sale.order.template.line: parent_id
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/sale.order.template.line/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","product_uom_qty","sale_order_template_id","company_id","product_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}/sale.order.template.line/search_read",
headers=headers,
json={"domain": [], "fields": ["name","product_uom_qty","sale_order_template_id","company_id","product_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/sale-order-template-line">sale.order.template.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.