sale.order: fields, relations and API
The sale.order model ("Sales Order") is a persistent model declared by the Sales module, then extended by 36 other modules. It exposes 188 fields, 154 of them declared directly on the model; 35 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- Label
- Sales Order
- Type
- Persistent (models.Model)
- SQL table
sale_order- Origin module
- Sales (
sale) - Extended by
- sale_management, sale_project, crm_sale_project, delivery, event_sale, event_booth_sale, sale_crm, mass_mailing_sale, sale_stock, stock_delivery, repair, sale_purchase, sale_purchase_stock, stock_dropshipping, partnership, pos_sale, sale_margin, pos_sale_stock, sale_mrp, sale_expense, sale_edi_ubl, sale_gelato, sale_loyalty, sale_loyalty_delivery, sale_pdf_quote_builder, sale_product_matrix, sale_timesheet, website_sale, website_sale_slides, website_event_booth_sale, website_event_sale, website_sale_stock, website_sale_collect, website_sale_gelato, website_sale_loyalty, website_sale_mrp
- Default order (_order)
date_order desc, id desc
Model fields
154 own fields, 29 inherited from mixins and 5 automatic ORM fields. Click a name to get a direct link to that field.
188 of 188 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| amount_delivery | Delivery Amount Tax included or excluded depending on the website configuration. | monetary | computed added by eCommerce ( |
| amount_invoiced | Already invoiced | monetary | computed |
| amount_paid | Payment Transactions Amount Sum of transactions made in through the online payment form that are in the state 'done' or 'authorized' and linked to this order. | float | computed |
| amount_tax | Taxes | monetary | computed, stored |
| amount_to_invoice | Un-invoiced Balance | monetary | computed |
| amount_total | Total | monetary | computed, stored |
| amount_unpaid | Amount Remaining Amount left to pay to avoid double payment or double invoicing. | monetary | computed, stored |
| amount_untaxed | Untaxed Amount | monetary | computed, stored |
| analytic_account_id | Analytic Account | many2one | |
| applied_coupon_ids | Manually Applied Coupons | many2many | added by Sale Loyalty ( |
| assigned_grade_id | Assigned Grade | many2one | computed added by Partnership / Membership ( |
| assigned_website_id | Website | many2one→ website | computed, stored added by eCommerce ( |
| attendee_count | Attendee Count | integer | computed added by Events Sales ( |
| authorized_transaction_ids | Authorized Transactions | many2many | computed |
| available_quotation_document_ids | Available Quotation Documents | many2many | computed added by Sales PDF Quotation Builder ( |
| campaign_id | Campaign | many2one | |
| carrier_id | Delivery Method Fill this field if you plan to invoice the shipping based on picking. | many2one | added by Delivery Costs ( |
| cart_quantity | Cart Quantity | integer | computed added by eCommerce ( |
| cart_recovery_email_sent | Cart recovery email already sent | boolean | added by eCommerce ( |
| client_order_ref | Customer Reference | char | |
| closed_task_count | Closed Task Count | integer | computed added by Sales - Project ( |
| code_enabled_rule_ids | Manually Triggered Rules | many2many | added by Sale Loyalty ( |
| commitment_date | Promised Delivery This is the delivery date promised to the customer. If set, the delivery order will be scheduled based on this date rather than product lead times. | datetime | |
| company_id | Company | many2one | required |
| company_price_include | Company Price Include | selection | related: |
| completed_task_percentage | Completed Task Percentage | float | computed added by Sales - Project ( |
| country_code | Country code | char | related: |
| coupon_point_ids | Coupon Point | one2many | inverse: added by Sale Loyalty ( |
| create_date | Creation Date | datetime | read-only |
| currency_id | Currency | many2one | computed, stored |
| currency_rate | Currency Rate | float | computed, stored |
| customizable_pdf_form_fields | Customizable PDF Form Fields | json | added by Sales PDF Quotation Builder ( |
| date_order | Order Date Creation date of draft/sent orders, Confirmation date of confirmed orders. | datetime | required |
| delivery_count | Delivery Orders | integer | computed added by Sales and Warehouse Management ( |
| delivery_date | Delivery Date | datetime | computed |
| delivery_message | Delivery Message | char | read-only added by Delivery Costs ( |
| delivery_set | Delivery Set | boolean | computed added by Delivery Costs ( |
| delivery_status | Delivery Status Blue: Not Delivered/Started Orange: Partially Delivered Green: Fully Delivered | selection | computed, stored Values: |
| delivery_type | Delivery Type | selection | related: added by Click & Collect ( |
| disabled_auto_rewards | Disabled Auto Rewards | many2many | added by Coupons, Promotions, Gift Card and Loyalty for eCommerce ( |
| document_tax_mode | Document Tax Mode | selection | requiredcomputed, stored Values: |
| dropship_picking_count | Dropship Count | integer | computed added by Drop Shipping ( |
| duplicated_order_ids | Duplicated Order | many2many | computed |
| effective_date | Effective Date Completion date of the first delivery order. | datetime | computed, stored added by Sales and Warehouse Management ( |
| event_booth_count | Booth Count | integer | computed added by Events Booths Sales ( |
| event_booth_ids | Booths | one2many | inverse: added by Events Booths Sales ( |
| expected_date | Expected Date Delivery date you can promise to the customer, computed from the minimum lead time of the order lines in case of Service products. In case of shipping, the shipping policy of the order will be taken into account to either use the minimum or maximum lead time of the order lines. | datetime | computed |
| expense_count | # of Expenses | integer | computed added by Sales Expense ( |
| expense_ids | Expenses | one2many | read-only inverse: added by Sales Expense ( |
| extra_total_fields | Extra Total Fields | json | computed |
| fiscal_position_id | Fiscal Position Fiscal positions are used to adapt taxes and accounts for particular customers or sales orders/invoices. The default value comes from the customer. | many2one | computed, stored |
| gift_card_count | Gift Card Count | integer | computed added by Sale Loyalty ( |
| grid | Matrix local storage Technical local storage of grid. If grid_update, will be loaded on the SO. If not, represents the matrix to open. | char | added by Sale Matrix ( |
| grid_product_tmpl_id | Grid Product Tmpl | many2one | added by Sale Matrix ( |
| grid_update | Grid Update | boolean | added by Sale Matrix ( |
| has_active_pricelist | Has Active Pricelist | boolean | computed |
| has_archived_products | Has Archived Products | boolean | computed |
| has_authorized_transaction_ids | Has Authorized Transactions | boolean | computed |
| has_overages | Has Overages | boolean | computed |
| incoterm | Incoterm International Commercial Terms are a series of predefined commercial terms used in international transactions. | many2one | computed, stored |
| incoterm_location | Incoterm Location | char | computed, stored |
| invoice_count | Invoice Count | integer | computed |
| invoice_ids | Invoices | many2many | computed |
| invoice_overages | Invoice Overages | boolean | |
| invoice_status | Invoice Status | selection | computed, stored Values: |
| invoicing_closed | Manually Closed For Invoicing If enabled, the order is considered fully invoiced regardless of lines. | boolean | |
| is_abandoned_cart | Abandoned Cart | boolean | computed added by eCommerce ( |
| is_all_service | Service Product | boolean | computed added by Delivery Costs ( |
| is_expired | Is Expired | boolean | computed |
| is_linked_to_expense_with_attachment | Is Linked To Expense With Attachment | boolean | computed added by Sales Expense ( |
| is_pdf_quote_builder_available | Is Pdf Quote Builder Available | boolean | computed added by Sales PDF Quotation Builder ( |
| is_pickup_required | Is Pickup Required | boolean | related: added by Product Availability ( |
| is_product_milestone | Is Product Milestone | boolean | computed added by Sales - Project ( |
| is_rating_email_sent | Rating email already sent | boolean | added by eCommerce ( |
| is_unfulfilled | Unfulfilled Orders | boolean | |
| journal_id | Journal If set, the SO will invoice in this journal; otherwise the sales journal with the lowest sequence is used. | many2one | computed, stored |
| json_popover | JSON data for the popover widget | char | computed added by Sales and Warehouse Management ( |
| late_availability | Late Availability True if any related picking has late availability | boolean | computed added by Sales and Warehouse Management ( |
| locked | Locked Locked orders cannot be modified. | boolean | |
| margin | Margin | monetary | computed, stored added by Margins in Sales Orders ( |
| margin_percent | Margin (%) | float | computed, stored added by Margins in Sales Orders ( |
| medium_id | Medium | many2one | |
| milestone_count | Milestone Count | integer | computed added by Sales - Project ( |
| mrp_production_count | Count of MO generated | integer | computed added by Sales and MRP Management ( |
| mrp_production_ids | Manufacturing orders associated with this sales order. | many2many | computed added by Sales and MRP Management ( |
| name | Order Reference | char | required |
| note | Terms and conditions | html | computed, stored |
| only_services | Only Services | boolean | computed added by eCommerce ( |
| opportunity_id | Opportunity | many2one→ crm.lead | added by Opportunity to Quotation ( |
| order_line | Order Lines | one2many | inverse: |
| origin | Source Document Reference of the document that generated this sales order request | char | |
| partner_credit_warning | Partner Credit Warning | text | computed |
| partner_id | Customer | many2one | required |
| partner_invoice_id | Invoice Address | many2one | requiredcomputed, stored |
| partner_shipping_id | Delivery Address | many2one | requiredcomputed, stored |
| payment_term_id | Payment Terms | many2one | computed, stored |
| pending_email_template_id | Pending Email Template | many2one | read-only |
| picking_ids | Transfers | one2many | inverse: added by Sales and Warehouse Management ( |
| picking_policy | Shipping Policy It specifies goods to be deliver partially or all at once | selection | required Values: added by Sales and Warehouse Management ( |
| pos_order_count | Pos Order Count | integer | read-onlycomputed added by POS - Sales ( |
| pos_order_line_ids | Order lines Transfered to Point of Sale | one2many | read-only inverse: added by POS - Sales ( |
| preferred_payment_method_line_id | Payment Method | many2one | computed, stored |
| prepayment_amount | Prepayment Amount The amount that must be paid by the customer to confirm the order. | monetary | computed |
| prepayment_percent | Prepayment The percentage of the amount that must be paid by the customer to confirm the order. | float | computed, stored |
| pricelist_id | Pricelist If you change the pricelist, the prices of all order lines will be updated accordingly. | many2one | computed, stored |
| project_account_id | Project Account | many2one | related: added by Sales - Project ( |
| project_count | Number of Projects | integer | computed added by Sales - Project ( |
| project_id | Project A task will be created for the project upon sales order confirmation. The analytic distribution of this project will also serve as a reference for newly created sales order items. | many2one | added by Sales - Project ( |
| project_ids | Projects | many2many | computed added by Sales - Project ( |
| project_required | Project Required | boolean | computed added by Sales - Project ( |
| purchase_order_count | Number of Purchase Order Generated | integer | computed added by Sale Purchase ( |
| quotation_document_ids | Headers/Footers | many2many | added by Sales PDF Quotation Builder ( |
| recompute_delivery_price | Delivery cost should be recomputed | boolean | added by Delivery Costs ( |
| reference | Payment Ref. The payment communication of this sale order. | char | |
| repair_count | Repair Order(s) | integer | computed added by Repairs ( |
| repair_order_ids | Repair Order | one2many | inverse: added by Repairs ( |
| report_grids | Print Variant Grids | boolean | added by Sale Matrix ( |
| require_signature | Online signature Request a online signature from the customer to confirm the order. | boolean | computed, stored |
| reward_amount | Reward Amount | float | computed added by Sale Loyalty ( |
| sale_order_template_id | Template | many2one | added by Sales ( |
| sale_warning_text | Sale Warning Internal warning for the partner or the products as set by the user. | text | computed |
| shipping_weight | Shipping Weight | float | computed, stored added by Delivery Costs ( |
| show_create_project_button | Show Create Project Button | boolean | computed added by Sales - Project ( |
| show_hours_recorded_button | Show Hours Recorded Button | boolean | computed added by Sales Timesheet ( |
| show_json_popover | Has late picking | boolean | computed added by Sales and Warehouse Management ( |
| show_project_button | Show Project Button | boolean | computed added by Sales - Project ( |
| show_ship_button | Show Ship Button | boolean | computed |
| show_sol_numbers | Show Sol Numbers | boolean | related: |
| signature | Signature | image | |
| signed_by | Signed By | char | |
| signed_on | Signed On | datetime | |
| source_id | Source | many2one | |
| state | Status | selection | read-only Values: |
| stock_reference_ids | References | many2many | added by Sales and Warehouse Management ( |
| tag_ids | Tags | many2many→ crm.tag | |
| tasks_count | Tasks | integer | computed added by Sales - Project ( |
| tasks_ids | Tasks associated with this sale | many2many | computed added by Sales - Project ( |
| tax_calculation_rounding_method | Tax Calculation Rounding Method | selection | related: |
| tax_country_id | Tax Country | many2one | computed |
| tax_totals | Tax Totals | json | computed |
| team_id | Sales Team | many2one→ crm.team | computed, stored |
| terms_type | Terms Type | selection | related: |
| timesheet_count | Timesheet activities | float | computed added by Sales Timesheet ( |
| timesheet_encode_uom_id | Timesheet Encode Uom | many2one→ uom.uom | related: added by Sales Timesheet ( |
| timesheet_total_duration | Timesheet Total Duration Total recorded duration, expressed in the encoding UoM, and rounded to the unit | integer | computed added by Sales Timesheet ( |
| transaction_count | Transaction Count | integer | computed |
| transaction_ids | Transactions | many2many | read-only |
| type_name | Type Name | char | computed |
| user_id | Salesperson | many2one | computed, stored |
| validity_date | Expiration Validity of the quotation. After this date, you will no longer be able to sign and pay it. | date | computed, stored |
| visible_project | Display project | boolean | read-onlycomputed added by Sales - Project ( |
| warehouse_id | Warehouse | many2one | computed, stored added by Sales and Warehouse Management ( |
| website_id | eCommerce Website Website through which this order was placed for eCommerce orders. | many2one→ website | read-only added by eCommerce ( |
| website_order_line | Order Lines displayed on Website | one2many | computed added by eCommerce ( |
| access_token | Security Token | char | inherited from portal.mixin |
| access_url | Portal Access URL Customer Portal URL | char | computed inherited from portal.mixin |
| access_warning | Access warning | text | computed inherited from portal.mixin |
| activity_calendar_event_id | Next Activity Calendar Event | many2one | computed inherited from mail.activity.mixin |
| activity_date_deadline | Next Activity Deadline | date | read-onlycomputed inherited from mail.activity.mixin |
| activity_exception_decoration | Activity Exception Decoration Type of the exception activity on record. | selection | computed Values: inherited from mail.activity.mixin |
| activity_exception_icon | Icon Icon to indicate an exception activity. | char | computed inherited from mail.activity.mixin |
| activity_ids | Activities | one2many | inverse: inherited from mail.activity.mixin |
| activity_plans_ids | Activity Plans | many2many | computed inherited from mail.activity.mixin |
| activity_state | Activity State Status based on activities Overdue: Due date is already passed Today: Activity date is today Planned: Future activities. | selection | computed Values: inherited from mail.activity.mixin |
| activity_summary | Next Activity Summary | char | related: inherited from mail.activity.mixin |
| activity_type_icon | Activity Type Icon | char | related: inherited from mail.activity.mixin |
| activity_type_id | Next Activity Type | many2one | related: inherited from mail.activity.mixin |
| activity_user_id | Responsible User | many2one | read-onlycomputed inherited from mail.activity.mixin |
| alerts | Alerts | json | inherited from website.checkout.alert.mixin |
| has_message | Has Message | boolean | computed inherited from mail.thread |
| message_attachment_count | Attachment Count | integer | computed inherited from mail.thread |
| message_follower_ids | Followers | one2many | inverse: inherited from mail.thread |
| message_has_error | Message Delivery error If checked, some messages have a delivery error. | boolean | computed inherited from mail.thread |
| message_has_error_counter | Number of errors Number of messages with delivery error | integer | computed inherited from mail.thread |
| message_has_sms_error | SMS Delivery error If checked, some messages have a delivery error. | boolean | computed inherited from mail.thread |
| message_ids | Messages | one2many | inverse: inherited from mail.thread |
| message_is_follower | Is Follower | boolean | computed inherited from mail.thread |
| message_needaction | Action Needed If checked, new messages require your attention. | boolean | computed inherited from mail.thread |
| message_needaction_counter | Number of Actions Number of messages requiring action | integer | computed inherited from mail.thread |
| message_partner_ids | Followers (Partners) | many2many | computed inherited from mail.thread |
| my_activity_date_deadline | My Activity Deadline | date | read-onlycomputed inherited from mail.activity.mixin |
| rating_ids | Ratings | one2many | inverse: inherited from mail.thread |
| utm_reference | UTM Reference | reference | inherited from utm.mixin |
| 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.analytic.account: analytic_account_id, project_account_id
- account.fiscal.position: fiscal_position_id
- account.incoterms: incoterm
- account.journal: journal_id
- account.move: invoice_ids
- account.payment.method.line: preferred_payment_method_line_id
- account.payment.term: payment_term_id
- crm.lead: opportunity_id
- crm.tag: tag_ids
- crm.team: team_id
- delivery.carrier: carrier_id
- event.booth: event_booth_ids
- hr.expense: expense_ids
- loyalty.card: applied_coupon_ids
- loyalty.reward: disabled_auto_rewards
- loyalty.rule: code_enabled_rule_ids
- mail.template: pending_email_template_id
- mrp.production: mrp_production_ids
- payment.transaction: authorized_transaction_ids, transaction_ids
- pos.order.line: pos_order_line_ids
- product.pricelist: pricelist_id
- product.template: grid_product_tmpl_id
- project.project: project_id, project_ids
- project.task: tasks_ids
- quotation.document: available_quotation_document_ids, quotation_document_ids
- repair.order: repair_order_ids
- res.company: company_id
- res.country: tax_country_id
- res.currency: currency_id
- res.partner: partner_id, partner_invoice_id, partner_shipping_id
- res.partner.grade: assigned_grade_id
- res.users: user_id
- sale.order: duplicated_order_ids
- sale.order.coupon.points: coupon_point_ids
- sale.order.line: order_line, website_order_line
- sale.order.template: sale_order_template_id
- stock.picking: picking_ids
- stock.reference: stock_reference_ids
- stock.warehouse: warehouse_id
- uom.uom: timesheet_encode_uom_id
- utm.campaign: campaign_id
- utm.medium: medium_id
- utm.source: source_id
- website: assigned_website_id, website_id
Fields of other models pointing here
- account.analytic.line: order_id
- choose.delivery.carrier: order_id
- delivery.note.wizard: so_id
- event.booth: sale_order_id
- event.registration: sale_order_id
- event.sale.report: sale_order_id
- expense.attachment.selection.wizard: sale_order_id
- hr.expense: sale_order_id
- hr.expense.split: sale_order_id
- loyalty.card: order_id
- pay.on.delivery: order_ids
- payment.transaction: sale_order_ids
- pos.order.line: sale_order_origin_id
- project.project: reinvoiced_sale_order_id, sale_order_id
- project.sale.line.employee.map: sale_order_id
- project.task: project_sale_order_id, sale_order_id
- purchase.order.line: sale_order_id
- registration.editor: sale_order_id
- repair.order: sale_order_id
- report.project.task.user: sale_order_id
- sale.advance.payment.inv: sale_order_ids
- sale.loyalty.coupon.wizard: order_id
- sale.loyalty.reward.wizard: order_id
- sale.mass.cancel.orders: sale_order_ids
- sale.order: duplicated_order_ids
- sale.order.coupon.points: order_id
- sale.order.discount: sale_order_id
- sale.order.line: order_id
- stock.lot: sale_order_ids
- stock.picking: sale_id
- stock.reference: sale_ids
- timesheets.analysis.report: order_id
- withdrawal.request: order_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/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","company_id","date_order","document_tax_mode","partner_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/search_read",
headers=headers,
json={"domain": [], "fields": ["name","company_id","date_order","document_tax_mode","partner_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">sale.order (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.