---
title: "Missing fields purchase_price and margin for sales order line in Odoo"
language: en
source_language: nl
translation_state: complete
canonical: https://documentation.invantive.eu/en/forum/6957/ontbrekende-velden-purchase-price-en-margin-voor-sales-order-line-in-odoo
original: https://documentation.invantive.eu/nl/forum/6957/ontbrekende-velden-purchase-price-en-margin-voor-sales-order-line-in-odoo
updated: 2026-11-30T17:23:57Z
license: https://documentation.invantive.eu/en/
---

# Missing fields purchase_price and margin for sales order line in Odoo

In the model `Sales.order.line` in the Odoo DB

The technical name for the ‘cost price’ field is: `purchase_price`.

The margin is also visible: that is `margin`.

Both belong to the model: `sale.order.line`

The fields do not come through via the API.

How is this possible?

## Accepted answer

The advice is to:

- to complete the details as described above;
- add the relevant content of `ir.model.fields` that shows the columns exist, for example with the query below;
- check that the Odoo user being used has the rights to read the fields.

Note that if the module concerned was recently installed in Odoo, it can take up to 10 hours before the cache is updated.

Query:

```
select *
from   model_fields
where  true
and    model = 'sale.order.line'
and    name in ('purchase_price', 'margin')
```

## Reply 2

### Additional information

Is it possible to add an (anonymised) screenshot of the request details in Online Monitoring on Invantive Cloud, as described in [Gain more insight with the new Monitoring](https://forums.invantive.com/t/meer-inzicht-met-nieuwe-online-monitoring/1404)?

You can find the details by clicking on the download request that corresponds to the subject of this thread.

The download request usually contains an SQL statement in which the table name is visible.

Please ensure that at least the following details are visible in both columns:

- the title bar containing the request ID,
- the status code, network size, path and timestamps in the left-hand column,
- the error code and error message at the very bottom of the left-hand column,
- the entire right-hand column, including the SQL statement, table name and parameter values.

For example:

[![image](/img/40342e69b0af8f6a8554cef79e1ecffe29b32aa08925ab22a2da35dee6ff503d/690x299.png)](https://forums.invantive.com/uploads/db9863/original/2X/7/7dae909497916214aa4e37beada3e4570c18eb9c.png)

### Check the correct server and user

Please check carefully that you are logging in to the Invantive Cloud website using the same username as the one you use to process data via, for example, Invantive Bridge Online. You will only see the requests from the Invantive Cloud user with which you log in to the website.

### Check the correct request and details

Make sure you select the request first to view the details. Only one request should be visible in the screenshot.

Also check carefully whether the request has a path containing `odata4`, `apps` or `mcp`. Requests with different paths are generally not relevant for this purpose.

### Error messages and tips by email

In addition, the Invantive Cloud user who received the error message will usually receive an email at their email address containing the error message and tips if an error occurs in Power BI, Power Query, Azure Data Factory, Qlik or Tableau.

We recommend checking the spam folder of the user concerned for any such emails sent from `support@invantive.eu`.

## Reply 4

This question was automatically closed after 1 week of inactivity. The last answer provided has been marked as the solution.

Please ask a new question in a separate thread if the problem reoccurs. Please include a link to this thread in the new question by pasting its URL into the text.

---

Source: [https://forums.invantive.eu/t/ontbrekende-velden-purchase-price-en-margin-voor-sales-order-line-in-odoo/6957](https://forums.invantive.eu/t/ontbrekende-velden-purchase-price-en-margin-voor-sales-order-line-in-odoo/6957)
