Custom Fields on Sale Order Lines in Odoo#
Standard sale order lines capture product, quantity, price, and tax. For many businesses, additional per-line data is needed: technical specifications, customer part numbers, delivery notes, or project references. Odoo Studio (or technical development) can add these fields.
Method 1 - Odoo Studio (No Code)#
Settings → Activate Developer Mode → Apps → Studio
Open a sale order → Edit with Studio → click the Order Lines tab → click a column or the + button to add a field:
- Field Type: Text (for free-form notes), Integer (for custom quantities), Many2one (for linked records), Date, Selection (dropdown)
- Label: "Customer Part Number"
- Technical Name: x_customer_part_number
- Placed in: Order Lines (sale.order.line model)
The field immediately appears as a column in the order lines table.
Method 2 - Developer Mode (No Studio License)#
In developer mode, you can add fields via the model view:
- Settings → Technical → Database Structure → Fields → New
- Model: sale.order.line
- Field Name: x_spec_notes
- Field Type: Text
Add the field to the sale order view via:
Settings → Technical → User Interface → Views → find the sale.order.line tree view → edit the XML to include the new field.
Common Custom Fields for Order Lines#
| Field | Purpose |
|---|---|
| Customer Part Number | Map Odoo product to customer's own part code |
| Customer PO Line Number | Link each line to the customer's PO reference |
| Delivery Note | Special handling instruction for this line |
| Project Code | Allocate the line to a specific project for billing |
| Technical Specification | Free-text product spec for manufacturing |
Printing Custom Fields on Documents#
For custom fields to appear on PDF quotations/orders:
- Settings → Technical → Reports → Quotation → edit the QWeb template
- Add the field:
Or use Studio's report editor to drag the field onto the PDF template.
Propagating to Delivery and Invoice#
By default, custom sale.order.line fields don't automatically copy to stock.move or account.move.line. If you need the field on delivery or invoice lines:
- Map the field in the delivery order via an automated action or development
- Or use analytic distribution to carry context to the invoice

