Skip to main content

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 hashes)

Uploaded Source

Built Distribution

odoocrm_python-0.1.4-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page