API wrapper for Odoo CRM written in Python
Project description
odoocrm-python
odoocrm is an API wrapper for Odoo CRM written in Python
Installing
pip install odoocrm-python
Usage
from odoocrm.client import Client
client = Client('URL', 'DATABASE', 'USERNAME', 'PASSWORD')
Search partner
response = client.search_partner([[['is_company', '=', True], ['customer', '=', True]]], {'offset': 10, 'limit': 5})
Read partner
response = client.read_partner([1, 2], {'fields': ['name', 'country_id', 'comment']})
Search and Read partner
response = client.search_read_partner([[]], {'fields': ['name', 'country_id', 'comment'], "order": "id asc"})
# Get all fields by not sending 'fields' paramater
Create partner
response = client.create_partner([{'name': "John doe",}])
List fields Partner
response = client.list_fields_partner()
Search partner Tags
response = client.search_partner_tag([[['name', '=', 'tag_name']]], {'offset': 10, 'limit': 5})
Create partner Tag (Category)
response = client.create_partner_tag("tag_name")
Requirements
- requests
Tests
python tests/test_client.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
odoocrm_python-0.1.4.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file odoocrm_python-0.1.4.tar.gz
.
File metadata
- Download URL: odoocrm_python-0.1.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d2cfafaa1bc6cc977b83cb55410d9a9d82f365da8a69ead3a527d4f7bfd916 |
|
MD5 | 17c0a2a2220c08bbcfc81f99bbe3f975 |
|
BLAKE2b-256 | 6e03f2f12390b23ecb462d3d530718faaffee925ba92cde52cd40bbdf24b23d4 |
File details
Details for the file odoocrm_python-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: odoocrm_python-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6be75be9f744847a8ba0c0071633e3e190ae19f22928ac2b7029dc27ff89025 |
|
MD5 | ded0f1fb3f30e71ff5a9e4b166119acd |
|
BLAKE2b-256 | 5645d385ea11f8a2888fa48a57192f1a60ad53cba4b06b447dee75d167692081 |