{ "info": { "author": "Dmytro Katyukha", "author_email": "dmytro.katyukha@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "Odoo RPC Client\n===============\n\n\n.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/pipeline.svg\n :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master\n\n.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/coverage.svg\n :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master\n\n.. image:: https://img.shields.io/readthedocs/odoo-rpc-client.svg\n :target: https://odoo-rpc-client.readthedocs.io/en/latest/\n\n-------------------\n\n.. contents::\n :depth: 2\n\n\nCanonical source\n----------------\n\nThe canonical source of *odoo-rpc-client* is hosted on `GitLab `__.\n\n\nOverview\n--------\n\nThis is core part of `OpenERP Proxy `__\n\nThis project is just **RPC client** for Odoo.\nThis project provides interface similar to\nOdoo internal code to perform operations on **Odoo** objects hiding\n**XML-RPC** or **JSON-RPC** behind.\n\n\nFeatures\n~~~~~~~~\n\n- *Python 3.3+* support\n- You can call any public method on any OpenERP / Odoo object including:\n *read*, *search*, *write*, *unlink* and others\n- Have *a lot of speed optimizations* (caching, read only requested fields,\n read data for all records in current set (cache), by one RPC call, etc)\n- Desinged to take as more benefits of **IPython autocomplete** as posible\n- Provides *browse\\_record* like interface, allowing to browse related\n models too. Supports `browse` method.\n Also adds method `search_records` to simplify\n search-and-read operations.\n- *Extension support*. You can easily modify most of components of this lib\n creating Your own extensions and plugins. It is realy simple. See for examples in\n `openerp_proxy/ext/ `__ directory.\n- *Plugin Support*. Plugins are same as extensions, but aimed to implement additional logic.\n For example look at `odoo_rpc_client/plugins `__\n and `odoo_rpc_client/plugin.py `__ \n- Support of **JSON-RPC** for *version 8+* of Odoo\n- Support of using **named parametrs** in RPC method calls (server version 6.1 and higher).\n- *Experimental* integration with `AnyField `__\n- Missed feature? fill and issue on `GitHub `__ or `GitLab `__\n\n\nQuick example\n~~~~~~~~~~~~~\n\n.. code:: python\n\n from odoo_rpc_client import Client\n\n # assume that odoo server is listening localhost on standard 8069 port and\n # have database 'my_db'.\n client = Client('localhost', 'my_db', 'user', 'password')\n\n # get current user\n client.user\n print(client.user.name)\n\n # simple rpc calls\n client.execute('res.partner', 'read', [user.partner_id.id])\n\n # Model browsing\n SaleOrder = client['sale.order']\n s_orders = SaleOrder.search_records([])\n for order in s_orders:\n print(order.name)\n for line in order.order_line:\n print(\"\\t%s\" % line.name)\n print(\"-\" * 5)\n print()\n\n\nSupported Odoo server versions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTested with:\n- Odoo versions: *7.0*, *8.0*, *9.0*, *10.0*, *11.0*, *12.0*\n- Python versions: *2.7*, *3.3*, *3.4*, *3.5*, *3.6*, *3.7*\n\n\nInstall\n-------\n\nThis project is present on `PyPI `__\nso it could be installed via PIP::\n\n pip install odoo_rpc_client\n\n\nUsage\n-----\n\nConnect to server / database\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe one diference betwen using as lib and using as shell is the way\nconnection to database is created. When using as shell the primary object\nis session, which provides some interactivity. But when using as library\nin most cases there are no need for that interactivity, so connection\nshould be created manualy, providing connection data from some other sources\nlike config file or something else.\n\nSo here is a way to create connection\n\n.. code:: python\n\n from odoo_rpc_client import Client\n db = Client(host='my_host.int',\n dbname='my_db',\n user='my_db_user',\n pwd='my_password here')\n\nAnd next all there same, no more differences betwen shell and lib usage.\n\n\nGeneral usage\n~~~~~~~~~~~~~\n\nFor example lets try to find how many sale orders in 'done' state we have in\nour database. (Look above sections to get help on how to connect to Odoo database)\n\n.. code:: python\n\n >>> sale_order_obj = db['sale.order'] # or You may use 'db.get_obj('sale.order')' if You like\n >>>\n >>> # Now lets search for sale orders:\n >>> sale_order_obj.search([('state', '=', 'done')], count=True)\n 5\n\nSo we have 5 orders in done state. So let's read them.\n\nDefault way to read data from Odoo is to search for required records\nwith *search* method which return's list of IDs of records, then read\ndata using *read* method. Both methods mostly same as Odoo internal\nones:\n\n.. code:: python\n\n >>> sale_order_ids = sale_order_obj.search([('state', '=', 'done')])\n >>> sale_order_datas = sale_order_obj.read(sale_order_ids, ['name']) # Last argument is optional.\n # it describes list of fields to read\n # if it is not provided then all fields\n # will be read\n >>> sale_order_datas[0]\n {'id': 3,\n 'name': 'SO0004'\n }\n\nAs we see reading data in such way allows us to get list of dictionaries\nwhere each contain fields have been read\n\nAnother way to read data is to use\n`search_records`\nor\n`read_lecords`\nmethod. Each of these methods receives same aguments as ``search`` or\n``read`` method respectively. But passing ``count`` argument for\n``search\\_records`` will cause error. Main difference betwen these methods\nin using `Record` class\ninstead of *dict* for each record had been read. Record class provides some orm-like abilities for records,\nallowing for example access fields as attributes and provide mechanisms\nto lazily fetch related fields.\n\n.. code:: python\n\n >>> sale_orders = sale_order_obj.search_records([('state', '=', 'done')])\n >>> sale_orders[0]\n R(sale.order, 9)[SO0011]\n >>>\n >>> # So we have list of Record objects. Let's check what they are\n >>> so = sale_orders[0]\n >>> so.id\n 9\n >>> so.name\n SO0011\n >>> so.partner_id\n R(res.partner, 9)[Better Corp]\n >>>\n >>> so.partner_id.name\n Better Corp\n >>> so.partner_id.active\n True\n\n\nAdditional features\n-------------------\n\nPlugins\n~~~~~~~\n\nIn version 0.4 plugin system was completly refactored. At this version\nwe start using `extend_me `__\nlibrary to build extensions and plugins easily.\n\nPlugins are usual classes that provides functionality that should be available\nat ``db.plugins.*`` point, implementing logic not related to core system.\n\n--------------\n\nFor more information see `source\ncode `__ and\n`documentation `__\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/katyukha/odoo-rpc-client", "keywords": "odoo,odoo-rpc,rpc,xmlrpc,xml-rpc,json-rpc,jsonrpc,odoo-client,openerp", "license": "MPL 2.0", "maintainer": "", "maintainer_email": "", "name": "odoo-rpc-client", "package_url": "https://pypi.org/project/odoo-rpc-client/", "platform": "", "project_url": "https://pypi.org/project/odoo-rpc-client/", "project_urls": { "Homepage": "https://gitlab.com/katyukha/odoo-rpc-client" }, "release_url": "https://pypi.org/project/odoo-rpc-client/1.0.0/", "requires_dist": [ "six (>=1.10)", "extend-me (>=1.1.3)", "setuptools (>=18)", "requests (>=2.7)", "simplejson", "anyfield ; extra == 'all'" ], "requires_python": "", "summary": "Odoo library for RPC", "version": "1.0.0" }, "last_serial": 4751984, "releases": { "0.8.0": [ { "comment_text": "", "digests": { "md5": "bbfb22bd12f2e39ef231123a8e5fd7d8", "sha256": "ad30113a36d1859de80b198a7e14f4dcaf5da12b2b343db2fbadb6d2d2ac6a64" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bbfb22bd12f2e39ef231123a8e5fd7d8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 65745, "upload_time": "2017-01-17T12:42:23", "url": "https://files.pythonhosted.org/packages/da/d4/a9b18a18e5875d6e60bdce87fe58a71af8a32c60bedad6a4a0666a9abf8d/odoo_rpc_client-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cda33e2cefcfe9fe352f4be5f901f1f6", "sha256": "2c9ae9882f5bf8bc684661ba329791b3def868d8af859b533d710e758262f799" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.0.tar.gz", "has_sig": false, "md5_digest": "cda33e2cefcfe9fe352f4be5f901f1f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63880, "upload_time": "2017-01-17T12:42:20", "url": "https://files.pythonhosted.org/packages/2c/30/83091302f507dc4d4fc75faf9ae2b0c2065e7396e69eebf8b6ef7feef3e4/odoo_rpc_client-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "488eb4074bdba5ca48d18a84f2e92441", "sha256": "6a6958019ddef34c254241639459c780454a9e8aad7f323d6de2028fc6607ed9" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "488eb4074bdba5ca48d18a84f2e92441", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 65639, "upload_time": "2017-02-07T14:50:32", "url": "https://files.pythonhosted.org/packages/7a/8f/26aafbec92319dbd4079148519634d28a732e0e22ac22853762480a70055/odoo_rpc_client-0.8.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dc936467600602b3c8882677e80a66d", "sha256": "ea648216080c43dfa48abf1b353a16bbe0f0f8278765a96d3d80a43fd19d7abb" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.1.tar.gz", "has_sig": false, "md5_digest": "5dc936467600602b3c8882677e80a66d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71223, "upload_time": "2017-02-07T14:50:30", "url": "https://files.pythonhosted.org/packages/f1/f7/e646778637bfeb1cf20144d732eba67b046cf953b607d109f8d76f13c227/odoo_rpc_client-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "a0fbd37d2673f7733f329b6748631c4f", "sha256": "16c13bee2b11caaa46c8a260cdb711a4329f2d9ffcd27406e4dadf7dd2c8b437" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a0fbd37d2673f7733f329b6748631c4f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 65903, "upload_time": "2017-02-28T13:49:48", "url": "https://files.pythonhosted.org/packages/71/c1/1fa59dce207929c2bfdb2d480974b89253acf869171b9f36f631ceec45fe/odoo_rpc_client-0.8.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a662bbf592dad0a1f489e554cc97c4cc", "sha256": "88d0522d767ccd5e16e085b84afffabef9eca93c8e35791a52e7bea0ea05dd4c" }, "downloads": -1, "filename": "odoo_rpc_client-0.8.2.tar.gz", "has_sig": false, "md5_digest": "a662bbf592dad0a1f489e554cc97c4cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71451, "upload_time": "2017-02-28T13:49:46", "url": "https://files.pythonhosted.org/packages/30/53/799c312b2b8dd0eb3b0b5ccad5e2e49b974f65eaded9e24d12940c424999/odoo_rpc_client-0.8.2.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "86d69bd6d784e566b5fa011956c5ef15", "sha256": "d550ecb19fa894d45bd1562ec44f10b19a9405af1a2d7f0f30c442ca281f5758" }, "downloads": -1, "filename": "odoo_rpc_client-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "86d69bd6d784e566b5fa011956c5ef15", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 66464, "upload_time": "2017-10-28T15:06:26", "url": "https://files.pythonhosted.org/packages/89/f4/014629f90c5091e98fc8c55bef348954eb8e50adb8db99eabb8b55723e95/odoo_rpc_client-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "73f8b004945402e012b57fb9591413f1", "sha256": "3f267203d457e7875ce350bb6b097a41efc3bc8b8c30a2f6a7e77745f6257edd" }, "downloads": -1, "filename": "odoo_rpc_client-0.9.0.tar.gz", "has_sig": false, "md5_digest": "73f8b004945402e012b57fb9591413f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70850, "upload_time": "2017-10-28T15:06:24", "url": "https://files.pythonhosted.org/packages/2a/bc/da33d6fc6cb1ea91f419ef96f9de77aef6cfb6024b15afa944c433991067/odoo_rpc_client-0.9.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "82702d6f4d3393d21fdb5c2cbab44986", "sha256": "6a869e1b1a1679b377a7bc25fc6cad884eb3b7591aed597de00a2ac6bea60b3e" }, "downloads": -1, "filename": "odoo_rpc_client-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82702d6f4d3393d21fdb5c2cbab44986", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 73649, "upload_time": "2019-01-28T21:40:56", "url": "https://files.pythonhosted.org/packages/62/a4/d36edd1dd717fd13dfe18b3c828269aabdd709c4aa44fb4f840489aba487/odoo_rpc_client-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6cffe0ea600374d06ffdc9deaecd61f0", "sha256": "afa4b2a9ac508e521544a291d8fbb168ed87e039ece96ea1ef8b0ca7ebf21012" }, "downloads": -1, "filename": "odoo_rpc_client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6cffe0ea600374d06ffdc9deaecd61f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68593, "upload_time": "2019-01-28T21:40:58", "url": "https://files.pythonhosted.org/packages/de/28/52d88faed392da52845a426702ec2592e54356863eb55fc003fead8bbec2/odoo_rpc_client-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82702d6f4d3393d21fdb5c2cbab44986", "sha256": "6a869e1b1a1679b377a7bc25fc6cad884eb3b7591aed597de00a2ac6bea60b3e" }, "downloads": -1, "filename": "odoo_rpc_client-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82702d6f4d3393d21fdb5c2cbab44986", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 73649, "upload_time": "2019-01-28T21:40:56", "url": "https://files.pythonhosted.org/packages/62/a4/d36edd1dd717fd13dfe18b3c828269aabdd709c4aa44fb4f840489aba487/odoo_rpc_client-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6cffe0ea600374d06ffdc9deaecd61f0", "sha256": "afa4b2a9ac508e521544a291d8fbb168ed87e039ece96ea1ef8b0ca7ebf21012" }, "downloads": -1, "filename": "odoo_rpc_client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6cffe0ea600374d06ffdc9deaecd61f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68593, "upload_time": "2019-01-28T21:40:58", "url": "https://files.pythonhosted.org/packages/de/28/52d88faed392da52845a426702ec2592e54356863eb55fc003fead8bbec2/odoo_rpc_client-1.0.0.tar.gz" } ] }