Skip to content

Odoo Fields Get

Ignacio Buioli edited this page Jan 18, 2021 · 2 revisions

Description

Get Odoo Model Fields.

Endpoint

POST /odoo-api/object/search_count

Parameters

Attribute Type Required Description
model string yes Odoo model
filters array no Odoo filter for records in search
db string yes Odoo server DB name
login string yes Odoo User
password string yes Odoo User Password

Examples

Python

import requests
import json

url = 'http://localhost:8069/odoo-api/object/fields_get'
data = {'params': {'model': 'res.partner', 'db': 'odoo', 'login': 'admin', 'password': 'admin'}}
headers = {'Content-type': 'application/json'}

r = requests.post(url, data=json.dumps(data), headers=headers)

print(r.text)

Angular

this.http.post<any>('http://localhost:8069/odoo-api/object/fields_get',
{params: {model: 'res.partner', db: 'odoo', login: 'admin', password: 'admin'}}).subscribe(data => {
    console.log(data.result);
});
Clone this wiki locally