Odoo 20.0 Community · Persistent

pos.order.line: fields, relations and API

The pos.order.line model ("Point of Sale Order Line") is a persistent model declared by the Point of Sale module, then extended by 9 other modules. It exposes 59 fields, 51 of them declared directly on the model; 8 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
pos.order.line
Label
Point of Sale Order Line
Type
Persistent (models.Model)
SQL table
pos_order_line
Origin module
Point of Sale (point_of_sale)
Extended by
l10n_fr_pos_cert, pos_event, pos_sale, pos_restaurant, pos_loyalty, pos_stock, pos_mrp, pos_self_order, pos_sale_stock
Display field (_rec_name)
product_id
Inherits from (mixins)
pos.load.mixinres.currency.rate.consolidation.mixin

Model fields

51 own fields, 2 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

59 of 59 fields shown

Technical nameLabelTypeDetails
attribute_value_idsSelected Attributesmany2many
card_idCard

The card used to claim that reward.

many2one

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

combo_idCombo Referencemany2one

added by POS Self Order (pos_self_order)

combo_item_idCombo Itemmany2one
combo_line_idsCombo Linesone2many

inverse: combo_parent_id

combo_parent_idCombo Parentmany2one
company_idCompanymany2one

related: order_id.company_id

course_idCourse Refmany2one

added by Restaurant (pos_restaurant)

currency_idCurrencymany2one

related: order_id.currency_id

custom_attribute_value_idsCustom Valuesone2many

inverse: pos_order_line_id

customer_noteCustomer Notechar
discountDiscount (%)float
down_payment_detailsDown Payment Detailstext

added by POS - Sales (pos_sale)

event_registration_idsEvent Registrationsone2many

inverse: pos_order_line_id

added by POS - Event (pos_event)

event_ticket_idEvent Ticketmany2one

added by POS - Event (pos_event)

extra_tax_dataExtra Tax Datajson
full_product_nameFull Product Namechar
gift_card_valsGift Card Vals

POS-only: the gift-card/eWallet program (and optional physical code and expiration date) this funding line sold. The loyalty.card is created from it when the order is saved; afterwards card_id holds the durable link.

json

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

has_default_productHas Default Product

To check whether the product is default product from pos.config or not. In case of description only SOLs we use default product from pos.config.

boolean
computed

added by POS - Sales (pos_sale)

is_editedEditedboolean
is_reward_lineIs Reward Line

Whether this line is part of a reward or not.

boolean

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

is_total_cost_computedIs Total Cost Computed

Allows to know if the total cost has already been computed or not

boolean
marginMarginmonetary
computed
margin_percentMargin (%)float
computed
nameLine Nochar
required
noteProduct Notechar
noticeDiscount Noticechar
order_idOrder Refmany2one
required
pack_lot_idsLot/serial Numberone2many

inverse: pos_order_line_id

added by PoS - Stock (pos_stock)

points_costPoints Cost

How many points this reward cost.

float

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

prep_line_idsPreparation linesone2many

inverse: pos_order_line_id

price_extraPrice extrafloat
price_subtotalTax Excl.monetary
requiredread-only
price_subtotal_inclTax Incl.monetary
requiredread-only
price_typePrice Typeselection

Values: original (Original), manual (Manual), automatic (Automatic)

price_unitUnit Pricefloat
product_idProductmany2one
required
product_uom_idProduct Unitmany2one

related: product_id.uom_id

qtyQuantityfloat
qty_deliveredDelivery Quantityfloat
computed, stored

added by POS - Sales (pos_sale)

refund_orderline_idsRefund Order Lines

Orderlines in this field are the lines that refunded this orderline.

one2many

inverse: refunded_orderline_id

refunded_orderline_idRefunded Order Line

If this orderline is a refund, then the refunded orderline is specified in this field.

many2one
refunded_qtyRefunded Quantity

Number of items refunded in this orderline.

float
computed
reward_idReward

The reward associated with this line.

many2one

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

sale_order_line_idSource Sale Order Linemany2one

added by POS - Sales (pos_sale)

sale_order_line_nameSale Order Line Nametext

related: sale_order_line_id.name

added by POS - Sales (pos_sale)

sale_order_origin_idLinked Sale Ordermany2one

added by POS - Sales (pos_sale)

tax_idsTaxesmany2many
read-only
tax_ids_after_fiscal_positionTaxes to Applymany2many
computed
total_costTotal costfloat
read-only
uuidUuidchar
read-only
consolidation_currency_idConsolidation Currencymany2one
computed

inherited from res.currency.rate.consolidation.mixin

consolidation_rateRatefloat
computed

inherited from res.currency.rate.consolidation.mixin

create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

Fields of other models pointing here

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
curl -X POST "https://your-instance.odoo.com/json/2/pos.order.line/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["product_id","name","order_id","price_subtotal","price_subtotal_incl"],"limit":5}'
Python (requests)
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}/pos.order.line/search_read",
    headers=headers,
    json={"domain": [], "fields": ["product_id","name","order_id","price_subtotal","price_subtotal_incl"], "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/pos-order-line">pos.order.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.