diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..6cbb9a9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,115 @@
+stages:
+ - lint
+ - tests
+ - coverage
+ - pages
+
+flake8:
+ image: python:3.6
+ stage: lint
+ variables:
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
+ cache:
+ key: "$CI_JOB_NAME"
+ paths:
+ - .cache
+ before_script:
+ - pip install flake8
+ script:
+ - flake8 --count --statistics odoo_rpc_client
+
+.tests-default: &test-default-definition
+ services:
+ - name: registry.gitlab.com/katyukha/odoo-ci:7.0
+ alias: odoo7
+ - name: registry.gitlab.com/katyukha/odoo-ci:8.0
+ alias: odoo8
+ - name: registry.gitlab.com/katyukha/odoo-ci:9.0
+ alias: odoo9
+ - name: registry.gitlab.com/katyukha/odoo-ci:10.0
+ alias: odoo10
+ - name: registry.gitlab.com/katyukha/odoo-ci:11.0
+ alias: odoo11
+ - name: registry.gitlab.com/katyukha/odoo-ci:12.0
+ alias: odoo12
+ variables:
+ ODOO_TEST_SUPER_PASSWORD: admin
+
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
+ cache:
+ key: "$CI_JOB_NAME"
+ paths:
+ - .cache
+ stage: tests
+ before_script:
+ - pip install -r requirements.txt -r requirements-test.txt
+ script:
+ - ODOO_TEST_HOST=odoo7 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo8 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo8 ODOO_TEST_PROTOCOL="json-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo9 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo9 ODOO_TEST_PROTOCOL="json-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo10 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo10 ODOO_TEST_PROTOCOL="json-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo11 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo11 ODOO_TEST_PROTOCOL="json-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo12 ODOO_TEST_PROTOCOL="xml-rpc" coverage run -p setup.py test
+ - ODOO_TEST_HOST=odoo12 ODOO_TEST_PROTOCOL="json-rpc" coverage run -p setup.py test
+ - coverage combine
+ - coverage report --fail-under=90
+ after_script:
+ - mv .coverage .coverage_${CI_JOB_NAME}
+ coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+\%)/'
+ artifacts:
+ name: "coverage_${CI_JOB_NAME}"
+ expire_in: 1 day
+ paths:
+ - .coverage_${CI_JOB_NAME}
+
+tests-py27:
+ image: python:2.7
+ <<: *test-default-definition
+
+tests-py33:
+ image: python:3.3
+ <<: *test-default-definition
+
+tests-py34:
+ image: python:3.4
+ <<: *test-default-definition
+
+tests-py35:
+ image: python:3.5
+ <<: *test-default-definition
+
+tests-py36:
+ image: python:3.6
+ <<: *test-default-definition
+
+tests-py37:
+ image: python:3.7
+ <<: *test-default-definition
+
+coverage:
+ image: python:3.7
+ stage: coverage
+ dependencies:
+ - tests-py27
+ - tests-py33
+ - tests-py34
+ - tests-py35
+ - tests-py36
+ - tests-py37
+ before_script:
+ - pip install coverage
+ script:
+ - coverage combine .coverage_tests-py27 .coverage_tests-py33 .coverage_tests-py34 .coverage_tests-py35 .coverage_tests-py36 .coverage_tests-py37
+ - coverage report --fail-under=95
+ after_script:
+ - coverage html
+ coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+\%)/'
+ artifacts:
+ name: "$CI_JOB_NAME"
+ expire_in: 14 day
+ paths:
+ - htmlcov
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5291d9e..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-sudo: required
-dist: trusty
-language: python
-python:
- - "2.7"
- - "3.3"
- - "3.4"
- - "3.5"
- - "3.6"
-
-cache:
- pip: true
- apt: true
-
-env:
- global:
- - TEST_DB_SERVICE=1
- - ODOO_INST_PATH=/tmp/odoo-inst
- matrix:
- - ODOO_VERSION="7.0"
-
- - ODOO_VERSION="8.0"
-
- - ODOO_VERSION="9.0"
-
- - ODOO_VERSION="10.0"
-
- - ODOO_VERSION="11.0"
-
-matrix:
- fast_finish: true
-
- # TODO: set local connector deprecated
- #include:
- #- python: 2.7
- #env: ODOO_VERSION="7.0"
- #ODOO_TEST_PROTOCOL='local'
- #WITH_SUDO="sudo"
- #OPENERP_SERVER='/etc/openerp/openerp-server.conf'
-
- #- python: 2.7
- #env: ODOO_VERSION="8.0"
- #ODOO_TEST_PROTOCOL='local'
- #WITH_SUDO="sudo"
- #OPENERP_SERVER='/etc/odoo/openerp-server.conf'
-
- #- python: 2.7
- #env: ODOO_VERSION="9.0"
- #ODOO_TEST_PROTOCOL='local'
- #WITH_SUDO="sudo"
- #OPENERP_SERVER='/etc/odoo/openerp-server.conf'
-
- #- python: 2.7
- #env: ODOO_VERSION="10.0"
- #ODOO_TEST_PROTOCOL='local'
- #WITH_SUDO="sudo"
- #OPENERP_SERVER='/etc/odoo/odoo.conf'
- #ODOO_RC='/etc/odoo/odoo.conf'
-
-
-install:
- - "wget -O /tmp/odoo-helper-install.bash https://raw.githubusercontent.com/katyukha/odoo-helper-scripts/master/install-system.bash"
- - "sudo bash /tmp/odoo-helper-install.bash"
- - "sudo odoo-helper install pre-requirements -y"
- - "sudo odoo-helper postgres user-create odoo odoo"
- - "odoo-helper install sys-deps -y ${ODOO_VERSION}"
- - "odoo-install -i $ODOO_INST_PATH --odoo-version ${ODOO_VERSION}"
-
- # Normal install
- - "pip install --upgrade 'coveralls>=1.1' 'setuptools>=18' pip pbr 'anyfield>=0.1.2' 'flake8>=3'"
- - "python setup.py develop"
-
-
-before_script:
- - "CDIR42=$(pwd) && cd $ODOO_INST_PATH && odoo-helper start && cd $CDIR42"
- - "sleep 3"
-
-script:
- - "flake8 odoo_rpc_client --count --statistics" # test code style
- - "bash ./scripts/ci_run_tests.bash"
-
-after_success:
- - "coveralls"
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4b37dc2..47c08c6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,12 @@
Last changes
============
+Release 1.0.0
+-------------
+
+- Support for timeout in connections
+- Changed license to `MPL 2.0 `__
+
Release 0.9.0
-------------
@@ -64,7 +70,7 @@ Release 0.7.0
- Drop support of OpenERP 6.0
- ``ext.repr``: Added ability to pass table format to .as_table method
tablefmt arg must be suitable for tabulate.tabulate method from
- [Tabulate](https://pypi.python.org/pypi/tabulate) package
+ `Tabulate `__ package
- Added ``openerp_proxy.experimental`` subpackage.
- Refactored session logic. Logic related to database / client connection
management moved to separate class ``openerp_proxy.session.ClientManager``
@@ -196,11 +202,11 @@ Release 0.6.2
-------------
- **experimental** Added integration with
- `AnyField `_
+ `AnyField `__
- Added ``RecordList.mapped`` method,
similar to Odoo's ``RecordSet.mapped`` method.
- Partial fix related to changes in Odoo versioning.
- See `Issue #9799 `_
+ See `Issue #9799 `__
- To ``module_utils`` plugin added ``update_module_list`` method.
- A bit of renaming (usualy used internaly)
(may affect custom plugins and extensions)
@@ -209,7 +215,7 @@ Release 0.6.2
- Added ``tabulate`` integration. Now when app is running under IPython
shell, it is posible to print ``RecordList``, and single ``Record``
as normal readable tables.
- Thanks to `Tabulate `_ project
+ Thanks to `Tabulate `__ project
- Added ability to extend Record of specific models.
This allows records of diferent models (objects) to behave specificaly
This may be used for example to add virtual fields in client sripts
diff --git a/LICENSE b/LICENSE
index fafef0d..14e2f77 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,15 +1,373 @@
-odoo-rpc-client - RPC client lib for Odoo / OpenERP
-Copyright (C) 2017 Dmytro Katyukha
+Mozilla Public License Version 2.0
+==================================
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+1. Definitions
+--------------
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
-You should have received a copy of the GNU General Public License
-along with this program. If not, see .
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/README.rst b/README.rst
index 4f4c268..e8b6800 100644
--- a/README.rst
+++ b/README.rst
@@ -1,15 +1,15 @@
-OpenERP / Odoo proxy
-====================
+Odoo RPC Client
+===============
-.. image:: https://travis-ci.org/katyukha/odoo-rpc-client.svg?branch=master
- :target: https://travis-ci.org/katyukha/odoo-rpc-client
+.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/pipeline.svg
+ :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master
-.. image:: https://coveralls.io/repos/github/katyukha/odoo-rpc-client/badge.svg?branch=master
- :target: https://coveralls.io/github/katyukha/odoo-rpc-client?branch=master
+.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/coverage.svg
+ :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master
-
-..
+.. image:: https://img.shields.io/readthedocs/odoo-rpc-client.svg
+ :target: https://odoo-rpc-client.readthedocs.io/en/latest/
-------------------
@@ -17,6 +17,12 @@ OpenERP / Odoo proxy
:depth: 2
+Canonical source
+----------------
+
+The canonical source of *odoo-rpc-client* is hosted on `GitLab `__.
+
+
Overview
--------
@@ -24,17 +30,10 @@ This is core part of `OpenERP Proxy `
This project is just **RPC client** for Odoo.
This project provides interface similar to
-Odoo internal code to perform operations on **OpenERP** / **Odoo** objects hiding
+Odoo internal code to perform operations on **Odoo** objects hiding
**XML-RPC** or **JSON-RPC** behind.
-***Note***: documentation now is "Work in Progress" state,
-so here is documentation from *openerp_proxy* project.
-In most cases it is compatible, except extensions, which are not part of this project.
-Thats why there are a lot of links to *openerp_proxy* documentation.
-
-
-
Features
~~~~~~~~
@@ -48,16 +47,16 @@ Features
models too. Supports `browse` method.
Also adds method `search_records` to simplify
search-and-read operations.
-- *Extension support*. You can easily modify most of components of this app/lib
+- *Extension support*. You can easily modify most of components of this lib
creating Your own extensions and plugins. It is realy simple. See for examples in
`openerp_proxy/ext/ `__ directory.
- *Plugin Support*. Plugins are same as extensions, but aimed to implement additional logic.
- For example look at `odoo_rpc_client/plugins `__
- and `odoo_rpc_client/plugin.py `__
+ For example look at `odoo_rpc_client/plugins `__
+ and `odoo_rpc_client/plugin.py `__
- Support of **JSON-RPC** for *version 8+* of Odoo
- Support of using **named parametrs** in RPC method calls (server version 6.1 and higher).
- *Experimental* integration with `AnyField `__
-- Missed feature? ask in `Project Issues `__
+- Missed feature? fill and issue on `GitHub `__ or `GitLab `__
Quick example
@@ -67,11 +66,13 @@ Quick example
from odoo_rpc_client import Client
+ # assume that odoo server is listening localhost on standard 8069 port and
+ # have database 'my_db'.
client = Client('localhost', 'my_db', 'user', 'password')
# get current user
client.user
- print(user.name)
+ print(client.user.name)
# simple rpc calls
client.execute('res.partner', 'read', [user.partner_id.id])
@@ -91,14 +92,14 @@ Supported Odoo server versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tested with:
-- Odoo versions: *7.0*, *8.0*, *9.0*, *10.0*, *11.0*
-- Python versions: *2.7*, *3.3*, *3.4*, *3.5*, *3.6*
+- Odoo versions: *7.0*, *8.0*, *9.0*, *10.0*, *11.0*, *12.0*
+- Python versions: *2.7*, *3.3*, *3.4*, *3.5*, *3.6*, *3.7*
Install
-------
-This project is present on `PyPI `_
+This project is present on `PyPI `__
so it could be installed via PIP::
pip install odoo_rpc_client
@@ -190,7 +191,7 @@ to lazily fetch related fields.
9
>>> so.name
SO0011
- >>> so.partner_id
+ >>> so.partner_id
R(res.partner, 9)[Better Corp]
>>>
>>> so.partner_id.name
@@ -206,7 +207,7 @@ Plugins
~~~~~~~
In version 0.4 plugin system was completly refactored. At this version
-we start using `extend_me `_
+we start using `extend_me `__
library to build extensions and plugins easily.
Plugins are usual classes that provides functionality that should be available
@@ -215,9 +216,5 @@ at ``db.plugins.*`` point, implementing logic not related to core system.
--------------
For more information see `source
-code `_
-
-Documentation for this project, is in "Work in progress state", so look for
-`openerp_proxy documentation `__,
-In basic things this project is compatible. For more compatability info
-look in `CHANGELOG `__
+code `__ and
+`documentation `__
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 3e015af..97fdea6 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -50,7 +50,7 @@
master_doc = 'index'
# General information about the project.
-project = u'odoo_rpc_client'
+project = u'Odoo RPC Client'
copyright = u'2015, Dmytro Katyukha'
# The version info for the project you're documenting, acts as replacement for
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a38b1e0..f360764 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -3,8 +3,8 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
-Welcome to odoo_rpc_client's documentation!
-=========================================
+Welcome to Odoo RPC Client's documentation!
+===========================================
Contents:
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index 627cb3c..f52ad94 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -1,15 +1,15 @@
-OpenERP / Odoo proxy
-====================
+Odoo RPC Client
+===============
-.. image:: https://travis-ci.org/katyukha/odoo-rpc-client.svg?branch=master
- :target: https://travis-ci.org/katyukha/odoo-rpc-client
+.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/pipeline.svg
+ :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master
-.. image:: https://coveralls.io/repos/github/katyukha/odoo-rpc-client/badge.svg?branch=master
- :target: https://coveralls.io/github/katyukha/odoo-rpc-client?branch=master
+.. image:: https://gitlab.com/katyukha/odoo-rpc-client/badges/master/coverage.svg
+ :target: https://gitlab.com/katyukha/odoo-rpc-client/commits/master
-
-..
+.. image:: https://img.shields.io/readthedocs/odoo-rpc-client.svg
+ :target: https://odoo-rpc-client.readthedocs.io/en/latest/
-------------------
@@ -24,17 +24,10 @@ This is core part of `OpenERP Proxy `
This project is just **RPC client** for Odoo.
This project provides interface similar to
-Odoo internal code to perform operations on **OpenERP** / **Odoo** objects hiding
+Odoo internal code to perform operations on **Odoo** objects hiding
**XML-RPC** or **JSON-RPC** behind.
-***Note***: documentation now is "Work in Progress" state,
-so here is documentation from *openerp_proxy* project.
-In most cases it is compatible, except extensions, which are not part of this project.
-Thats why there are a lot of links to *openerp_proxy* documentation.
-
-
-
Features
~~~~~~~~
@@ -48,16 +41,16 @@ Features
models too. Supports `browse` method.
Also adds method `search_records` to simplify
search-and-read operations.
-- *Extension support*. You can easily modify most of components of this app/lib
+- *Extension support*. You can easily modify most of components of this lib
creating Your own extensions and plugins. It is realy simple. See for examples in
`openerp_proxy/ext/ `__ directory.
- *Plugin Support*. Plugins are same as extensions, but aimed to implement additional logic.
- For example look at `odoo_rpc_client/plugins `__
- and `odoo_rpc_client/plugin.py `__
+ For example look at `odoo_rpc_client/plugins `__
+ and `odoo_rpc_client/plugin.py `__
- Support of **JSON-RPC** for *version 8+* of Odoo
- Support of using **named parametrs** in RPC method calls (server version 6.1 and higher).
- *Experimental* integration with `AnyField `__
-- Missed feature? ask in `Project Issues `__
+- Missed feature? fill and issue on `GitHub `__ or `GitLab `__
Quick example
@@ -67,11 +60,13 @@ Quick example
from odoo_rpc_client import Client
+ # assume that odoo server is listening localhost on standard 8069 port and
+ # have database 'my_db'.
client = Client('localhost', 'my_db', 'user', 'password')
# get current user
client.user
- print(user.name)
+ print(client.user.name)
# simple rpc calls
client.execute('res.partner', 'read', [user.partner_id.id])
@@ -91,14 +86,14 @@ Supported Odoo server versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tested with:
-- Odoo versions: *7.0*, *8.0*, *9.0*, *10.0*
-- Python versions: *2.7*, *3.3*, *3.4*, *3.5*, *3.6*
+- Odoo versions: *7.0*, *8.0*, *9.0*, *10.0*, *11.0*, *12.0*
+- Python versions: *2.7*, *3.3*, *3.4*, *3.5*, *3.6*, *3.7*
Install
-------
-This project is present on `PyPI `_
+This project is present on `PyPI `__
so it could be installed via PIP::
pip install odoo_rpc_client
@@ -190,7 +185,7 @@ to lazily fetch related fields.
9
>>> so.name
SO0011
- >>> so.partner_id
+ >>> so.partner_id
R(res.partner, 9)[Better Corp]
>>>
>>> so.partner_id.name
@@ -206,7 +201,7 @@ Plugins
~~~~~~~
In version 0.4 plugin system was completly refactored. At this version
-we start using `extend_me `_
+we start using `extend_me `__
library to build extensions and plugins easily.
Plugins are usual classes that provides functionality that should be available
@@ -215,9 +210,5 @@ at ``db.plugins.*`` point, implementing logic not related to core system.
--------------
For more information see `source
-code `_
-
-Documentation for this project, is in "Work in progress state", so look for
-`openerp_proxy documentation `__,
-In basic things this project is compatible. For more compatability info
-look in `CHANGELOG `__
+code `__ and
+`documentation `__
diff --git a/docs/source/module_ref/modules.rst b/docs/source/module_ref/modules.rst
index c6149cd..a21e6d4 100644
--- a/docs/source/module_ref/modules.rst
+++ b/docs/source/module_ref/modules.rst
@@ -1,5 +1,5 @@
-OpenERP Proxy Modules
-=====================
+Odoo RPC Client Modules
+=======================
.. toctree::
:maxdepth: 2
diff --git a/docs/source/module_ref/odoo_rpc_client.rst b/docs/source/module_ref/odoo_rpc_client.rst
index 1527b45..0f27423 100644
--- a/docs/source/module_ref/odoo_rpc_client.rst
+++ b/docs/source/module_ref/odoo_rpc_client.rst
@@ -1,7 +1,7 @@
.. _package-odoo_rpc_client:
:mod:`odoo_rpc_client` Package
-============================
+==============================
.. automodule:: odoo_rpc_client.__init__
:members:
@@ -9,7 +9,7 @@
:show-inheritance:
:mod:`client` Module
-------------------
+--------------------
.. automodule:: odoo_rpc_client.client
:members:
diff --git a/odoo_rpc_client/__init__.py b/odoo_rpc_client/__init__.py
index cfa7730..ba7d1c4 100644
--- a/odoo_rpc_client/__init__.py
+++ b/odoo_rpc_client/__init__.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from .client import Client # noqa
from . import version
diff --git a/odoo_rpc_client/client.py b/odoo_rpc_client/client.py
index 565dfd6..872a345 100644
--- a/odoo_rpc_client/client.py
+++ b/odoo_rpc_client/client.py
@@ -1,4 +1,12 @@
# -*- coding: utf8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
"""
This module provides some classes to simplify access to Odoo server via xmlrpc.
@@ -62,7 +70,7 @@
from pkg_resources import parse_version
# project imports
-from .connection import get_connector
+from .connection import get_connector, DEFAULT_TIMEOUT
from .exceptions import LoginException
from .service import ServiceManager
from .plugin import PluginManager
@@ -94,12 +102,13 @@ class Client(Extensible):
:param str protocol: protocol used to connect.
To get list of available protcols call:
``odoo_rpc_client.connection.get_connector_names()``
+ :param float timeout: Connection timeout
any other keyword arguments will be directly passed to connector
Example::
- >>> db = Client('host', 'dbname', 'user', pwd = 'Password')
+ >>> db = Client('host', 'dbname', 'user', pwd='Password')
>>> cl = Client('host')
>>> db2 = cl.login('dbname', 'user', 'password')
@@ -110,12 +119,13 @@ class Client(Extensible):
"""
def __init__(self, host, dbname=None, user=None, pwd=None, port=8069,
- protocol='xml-rpc', **extra_args):
+ protocol='xml-rpc', timeout=DEFAULT_TIMEOUT, **extra_args):
self._dbname = dbname
self._username = user
self._pwd = pwd
- self._connection = get_connector(protocol)(host, port, extra_args)
+ self._connection = get_connector(protocol)(
+ host, port, timeout, extra_args)
self._services = ServiceManager(self)
self._plugins = PluginManager(self)
@@ -487,3 +497,6 @@ def __eq__(self, other):
return self.get_url() == other.get_url()
else:
return False
+
+ def _ipython_key_completions_(self):
+ return self.services['object'].get_registered_objects()
diff --git a/odoo_rpc_client/connection/__init__.py b/odoo_rpc_client/connection/__init__.py
index e2e11b0..29e00ee 100644
--- a/odoo_rpc_client/connection/__init__.py
+++ b/odoo_rpc_client/connection/__init__.py
@@ -1,5 +1,15 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from . import (xmlrpc, # noqa
jsonrpc) # noqa
from .connection import (ConnectorBase, # noqa
get_connector, # noqa
- get_connector_names) # noqa
+ get_connector_names, # noqa
+ DEFAULT_TIMEOUT) # noqa
diff --git a/odoo_rpc_client/connection/connection.py b/odoo_rpc_client/connection/connection.py
index ab46f79..c5f85c1 100644
--- a/odoo_rpc_client/connection/connection.py
+++ b/odoo_rpc_client/connection/connection.py
@@ -1,6 +1,17 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
from extend_me import ExtensibleByHashType
+DEFAULT_TIMEOUT = None
+
__all__ = ('get_connector', 'get_connector_names', 'ConnectorBase')
ConnectorType = ExtensibleByHashType._('Connector', hashattr='name')
@@ -26,9 +37,10 @@ class ConnectorBase(six.with_metaclass(ConnectorType)):
:param dict extra_args: extra arguments for specific connector.
"""
- def __init__(self, host, port, extra_args=None):
+ def __init__(self, host, port, timeout=DEFAULT_TIMEOUT, extra_args=None):
self._host = host
self._port = port
+ self._timeout = timeout
self._extra_args = {} if extra_args is None else extra_args
self.__services = {}
@@ -45,6 +57,12 @@ def port(self):
"""
return self._port
+ @property
+ def timeout(self):
+ """ Connector timeout
+ """
+ return self._timeout
+
@property
def extra_args(self):
""" Connector extra arguments
diff --git a/odoo_rpc_client/connection/jsonrpc.py b/odoo_rpc_client/connection/jsonrpc.py
index 90d8a1c..6a39416 100644
--- a/odoo_rpc_client/connection/jsonrpc.py
+++ b/odoo_rpc_client/connection/jsonrpc.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
# python imports
import simplejson # Standard json cannot dump bytes on py3
import random
@@ -5,7 +14,7 @@
import logging
# project imports
-from .connection import ConnectorBase
+from .connection import ConnectorBase, DEFAULT_TIMEOUT
from .. import exceptions as exceptions
from ..utils import ustr
@@ -79,9 +88,11 @@ def __call__(self, *args):
# Call rpc
try:
- res = requests.post(self.__url, data=data, headers={
- "Content-Type": "application/json",
- }, verify=self.__rpc_proxy.ssl_verify)
+ res = requests.post(
+ self.__url, data=data,
+ headers={"Content-Type": "application/json"},
+ verify=self.__rpc_proxy.ssl_verify,
+ timeout=self.__rpc_proxy.timeout)
except requests.exceptions.RequestException as exc:
msg = ("Cannot connect to url %s\n"
"Exception %s raised!" % (self.__url, exc))
@@ -115,7 +126,8 @@ def __call__(self, *args):
class JSONRPCProxy(object):
""" Simple Odoo service proxy wrapper
"""
- def __init__(self, host, port, service, ssl=False, ssl_verify=True):
+ def __init__(self, host, port, service, ssl=False, ssl_verify=True,
+ timeout=DEFAULT_TIMEOUT):
self.host = host
self.port = port
self.service = service
@@ -127,6 +139,7 @@ def __init__(self, host, port, service, ssl=False, ssl_verify=True):
# request parametrs
self.ssl_verify = ssl_verify
+ self.timeout = timeout
# variable to cach methods
self._methods = {}
@@ -162,6 +175,7 @@ def _get_service(self, name):
self.port,
name,
ssl=self.Meta.use_ssl,
+ timeout=self.timeout,
**self.extra_args)
diff --git a/odoo_rpc_client/connection/xmlrpc.py b/odoo_rpc_client/connection/xmlrpc.py
index 13bed64..11ddb72 100644
--- a/odoo_rpc_client/connection/xmlrpc.py
+++ b/odoo_rpc_client/connection/xmlrpc.py
@@ -1,8 +1,19 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
# python imports
+import six
from six.moves import xmlrpc_client as xmlrpclib
+from six.moves import http_client as httplib
# project imports
-from .connection import ConnectorBase
+from .connection import ConnectorBase, DEFAULT_TIMEOUT
from ..utils import ustr
from .. import exceptions as exceptions
@@ -48,10 +59,59 @@ def __call__(self, *args):
return res
+if six.PY2:
+ class _TimeoutTransport(xmlrpclib.Transport):
+ def __init__(self, timeout=DEFAULT_TIMEOUT, *args, **kwargs):
+ xmlrpclib.Transport.__init__(self, *args, **kwargs)
+ self.timeout = timeout
+
+ def make_connection(self, host):
+ # -- Based on original python code --
+ #
+ # return an existing connection if possible. This allows
+ # HTTP/1.1 keep-alive.
+ if self._connection and host == self._connection[0]:
+ return self._connection[1]
+
+ # create a HTTP connection object from a host descriptor
+ chost, self._extra_headers, x509 = self.get_host_info(host)
+ # store the host argument along with the connection object
+ self._connection = host, httplib.HTTPConnection(
+ chost, timeout=self.timeout)
+ return self._connection[1]
+elif six.PY3:
+ class _TimeoutTransport(xmlrpclib.Transport):
+ def __init__(self, timeout=DEFAULT_TIMEOUT, *args, **kwargs):
+ super(_TimeoutTransport, self).__init__(*args, **kwargs)
+ self.timeout = timeout
+
+ def make_connection(self, host):
+ # -- Based on original python code --
+ #
+ # return an existing connection if possible. This allows
+ # HTTP/1.1 keep-alive.
+ if self._connection and host == self._connection[0]:
+ return self._connection[1]
+
+ # create a HTTP connection object from a host descriptor
+ chost, self._extra_headers, x509 = self.get_host_info(host)
+ # store the host argument along with the connection object
+ self._connection = host, httplib.HTTPConnection(
+ chost, timeout=self.timeout)
+ return self._connection[1]
+else:
+ _TimeoutTransport = xmlrpclib.Transport
+
+
class XMLRPCProxy(xmlrpclib.ServerProxy):
""" Wrapper class around XML-RPC's ServerProxy to wrap method's errors
into XMLRPCError class
"""
+ def __init__(self, uri, timeout=DEFAULT_TIMEOUT, *args, **kwargs):
+ transport = _TimeoutTransport(timeout=timeout, *args, **kwargs)
+ kwargs['transport'] = transport
+ xmlrpclib.ServerProxy.__init__(self, uri, *args, **kwargs)
+
def __getattr__(self, name):
res = xmlrpclib.ServerProxy.__getattr__(self, name)
if isinstance(res, xmlrpclib._Method):
@@ -76,7 +136,10 @@ def get_service_url(self, service_name):
return '%s://%s/xmlrpc/%s' % (proto, addr, service_name)
def _get_service(self, name):
- return XMLRPCProxy(self.get_service_url(name), **self.extra_args)
+ return XMLRPCProxy(
+ self.get_service_url(name),
+ timeout=self.timeout,
+ **self.extra_args)
class ConnectorXMLRPCS(ConnectorXMLRPC):
diff --git a/odoo_rpc_client/exceptions.py b/odoo_rpc_client/exceptions.py
index 6023635..b121731 100644
--- a/odoo_rpc_client/exceptions.py
+++ b/odoo_rpc_client/exceptions.py
@@ -1,3 +1,13 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
+
class Error(Exception):
""" Base class for exceptions"""
pass
diff --git a/odoo_rpc_client/orm/__init__.py b/odoo_rpc_client/orm/__init__.py
index 1fd7c14..c4e2369 100644
--- a/odoo_rpc_client/orm/__init__.py
+++ b/odoo_rpc_client/orm/__init__.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from .cache import empty_cache # noqa
from .object import (get_object, # noqa
Object) # noqa
diff --git a/odoo_rpc_client/orm/cache.py b/odoo_rpc_client/orm/cache.py
index 1925348..fec7ce3 100644
--- a/odoo_rpc_client/orm/cache.py
+++ b/odoo_rpc_client/orm/cache.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
import collections
diff --git a/odoo_rpc_client/orm/object.py b/odoo_rpc_client/orm/object.py
index 10fbb3e..7697dbe 100644
--- a/odoo_rpc_client/orm/object.py
+++ b/odoo_rpc_client/orm/object.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
from extend_me import ExtensibleByHashType
from pkg_resources import parse_version
diff --git a/odoo_rpc_client/orm/record.py b/odoo_rpc_client/orm/record.py
index 30b69a3..f8c5215 100644
--- a/odoo_rpc_client/orm/record.py
+++ b/odoo_rpc_client/orm/record.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
""" This module contains classes and logic to handle operations on records
"""
@@ -136,6 +145,9 @@ def __dir__(self):
res.extend(self._object.stdcall_methods)
return list(set(res))
+ def _ipython_key_completions_(self):
+ return list(self._object.columns_info)
+
@property
def id(self):
""" Record ID
diff --git a/odoo_rpc_client/orm/service.py b/odoo_rpc_client/orm/service.py
index 3e3623d..2f597ad 100644
--- a/odoo_rpc_client/orm/service.py
+++ b/odoo_rpc_client/orm/service.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from ..service.object import ObjectService
from .object import get_object
diff --git a/odoo_rpc_client/plugin.py b/odoo_rpc_client/plugin.py
index 43bea68..af7e0a1 100644
--- a/odoo_rpc_client/plugin.py
+++ b/odoo_rpc_client/plugin.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
# Python imports
import six
import extend_me
diff --git a/odoo_rpc_client/plugins/__init__.py b/odoo_rpc_client/plugins/__init__.py
index 227854e..77bfe1b 100644
--- a/odoo_rpc_client/plugins/__init__.py
+++ b/odoo_rpc_client/plugins/__init__.py
@@ -1,2 +1,11 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
""" This package contains plugins provided out-of-the-box
"""
diff --git a/odoo_rpc_client/plugins/external_ids.py b/odoo_rpc_client/plugins/external_ids.py
index 366c33a..f411693 100644
--- a/odoo_rpc_client/plugins/external_ids.py
+++ b/odoo_rpc_client/plugins/external_ids.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
"""
"""
diff --git a/odoo_rpc_client/plugins/module_utils.py b/odoo_rpc_client/plugins/module_utils.py
index 6486c69..6da958b 100644
--- a/odoo_rpc_client/plugins/module_utils.py
+++ b/odoo_rpc_client/plugins/module_utils.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from ..plugin import Plugin
from ..orm.object import Object
from ..utils import (stdcall,
diff --git a/odoo_rpc_client/service/__init__.py b/odoo_rpc_client/service/__init__.py
index 7262254..e5f66f5 100644
--- a/odoo_rpc_client/service/__init__.py
+++ b/odoo_rpc_client/service/__init__.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from . import (object, # noqa
report, # noqa
db) # noqa
diff --git a/odoo_rpc_client/service/db.py b/odoo_rpc_client/service/db.py
index 8fa77d6..3972a7e 100644
--- a/odoo_rpc_client/service/db.py
+++ b/odoo_rpc_client/service/db.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
import re
from pkg_resources import parse_version
@@ -86,6 +95,9 @@ def dump_db(self, password, db, **kwargs):
Note, that from defined arguments, may be passed other arguments
(for example odoo version 9.0 requires format arg to be passed)
+ Note, this method may consume huge amout of memory.
+ In production dump/restore have to be done by other means.
+
:param str password: super admin password
:param str|Client db: name of database or *Client* instance
with *client.dbname is not None*
@@ -104,13 +116,16 @@ def dump_db(self, password, db, **kwargs):
# Ensure returned data is not unicode, but bytes
if isinstance(dump_data, six.text_type):
- dump_data = dump_data.encode()
+ dump_data = dump_data
return dump_data
def restore_db(self, password, dbname, data, **kwargs):
""" Restore database
+ Note, this method may consume huge amout of memory.
+ In production dump/restore have to be done by other means.
+
:param str password: super admin password
:param str dbname: name of database
:param bytes data: restore data (base64 encoded string)
diff --git a/odoo_rpc_client/service/object.py b/odoo_rpc_client/service/object.py
index b182cff..08834f4 100644
--- a/odoo_rpc_client/service/object.py
+++ b/odoo_rpc_client/service/object.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from pkg_resources import parse_version
from ..service.service import ServiceBase
diff --git a/odoo_rpc_client/service/report.py b/odoo_rpc_client/service/report.py
index e1614a9..6d0d840 100644
--- a/odoo_rpc_client/service/report.py
+++ b/odoo_rpc_client/service/report.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
""" Report printing logic
Best way to generate report is::
diff --git a/odoo_rpc_client/service/service.py b/odoo_rpc_client/service/service.py
index 82484b4..3eb6bdd 100644
--- a/odoo_rpc_client/service/service.py
+++ b/odoo_rpc_client/service/service.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
from extend_me import (ExtensibleByHashType,
Extensible)
diff --git a/odoo_rpc_client/tests/__init__.py b/odoo_rpc_client/tests/__init__.py
index 1f24885..b1aba4c 100644
--- a/odoo_rpc_client/tests/__init__.py
+++ b/odoo_rpc_client/tests/__init__.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import os
import six
import unittest
diff --git a/odoo_rpc_client/tests/all.py b/odoo_rpc_client/tests/all.py
index 23cc987..02e2484 100644
--- a/odoo_rpc_client/tests/all.py
+++ b/odoo_rpc_client/tests/all.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from .test_connection import * # noqa
from .test_client import * # noqa
from .test_orm import * # noqa
diff --git a/odoo_rpc_client/tests/test_client.py b/odoo_rpc_client/tests/test_client.py
index 043f8b6..a1b2994 100644
--- a/odoo_rpc_client/tests/test_client.py
+++ b/odoo_rpc_client/tests/test_client.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import unittest
import pkg_resources
@@ -8,8 +17,8 @@
from ..service.service import ServiceManager
from ..plugin import Plugin
-VERSION_CLASSES = (pkg_resources.SetuptoolsLegacyVersion,
- pkg_resources.SetuptoolsVersion)
+VERSION_CLASSES = (pkg_resources.packaging.version.LegacyVersion,
+ pkg_resources.packaging.version.Version)
class Test_10_Client(BaseTestCase):
@@ -253,3 +262,20 @@ def test_221_ref_un_existing(self):
def test_222_ref_no_module_spec(self):
with self.assertRaises(ValueError):
self.client.ref('main_partner') # no module specified
+
+
+class Test_10_Client_Timeout(BaseTestCase):
+
+ def setUp(self):
+ super(self.__class__, self).setUp()
+ self.client = Client(self.env.host,
+ dbname=self.env.dbname,
+ user=self.env.user,
+ pwd=self.env.password,
+ protocol=self.env.protocol,
+ port=self.env.port,
+ timeout=10.0)
+
+ def test_120_username(self):
+ self.assertEqual(self.client.username, self.env.user)
+ self.assertEqual(self.client.user.login, self.env.user)
diff --git a/odoo_rpc_client/tests/test_connection.py b/odoo_rpc_client/tests/test_connection.py
index 50128c4..c0cfbf2 100644
--- a/odoo_rpc_client/tests/test_connection.py
+++ b/odoo_rpc_client/tests/test_connection.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from . import BaseTestCase
from ..client import Client
from ..exceptions import (LoginException,
diff --git a/odoo_rpc_client/tests/test_db.py b/odoo_rpc_client/tests/test_db.py
index 85e1dc7..4135fd9 100644
--- a/odoo_rpc_client/tests/test_db.py
+++ b/odoo_rpc_client/tests/test_db.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from . import BaseTestCase
from ..client import Client
from ..service.db import to_dbname
@@ -27,7 +36,7 @@ def test_00_create_db(self):
self.env.dbname, demo=True,
admin_password=self.env.password)
else:
- raise unittest.SkipTest("database already creaated. "
+ raise unittest.SkipTest("database already created. "
"no need to create it")
def test_10_to_dbname(self):
diff --git a/odoo_rpc_client/tests/test_orm.py b/odoo_rpc_client/tests/test_orm.py
index e067517..32910ec 100644
--- a/odoo_rpc_client/tests/test_orm.py
+++ b/odoo_rpc_client/tests/test_orm.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
import numbers
import collections
diff --git a/odoo_rpc_client/tests/test_plugins.py b/odoo_rpc_client/tests/test_plugins.py
index 07dfa3c..9fd84ca 100644
--- a/odoo_rpc_client/tests/test_plugins.py
+++ b/odoo_rpc_client/tests/test_plugins.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
from . import BaseTestCase
from .. import Client
from ..orm import (Record,
diff --git a/odoo_rpc_client/tests/test_service_report.py b/odoo_rpc_client/tests/test_service_report.py
index 6d27f74..2e045fc 100644
--- a/odoo_rpc_client/tests/test_service_report.py
+++ b/odoo_rpc_client/tests/test_service_report.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import os
import os.path
from pkg_resources import parse_version as V
diff --git a/odoo_rpc_client/tests/test_utils.py b/odoo_rpc_client/tests/test_utils.py
index b65a1f3..c2ca664 100644
--- a/odoo_rpc_client/tests/test_utils.py
+++ b/odoo_rpc_client/tests/test_utils.py
@@ -1,4 +1,11 @@
# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
import six
diff --git a/odoo_rpc_client/utils.py b/odoo_rpc_client/utils.py
index 00330d7..92d017b 100644
--- a/odoo_rpc_client/utils.py
+++ b/odoo_rpc_client/utils.py
@@ -1,4 +1,12 @@
# -*- encoding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import six
import functools
diff --git a/odoo_rpc_client/version.py b/odoo_rpc_client/version.py
index e175bc2..9c3729b 100644
--- a/odoo_rpc_client/version.py
+++ b/odoo_rpc_client/version.py
@@ -1 +1,10 @@
-version = "0.9.0" # pragma: no cover
+# -*- coding: utf-8 -*-
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
+version = "1.0.0" # pragma: no cover
diff --git a/release.bash b/release.bash
index cb04003..58959a7 100755
--- a/release.bash
+++ b/release.bash
@@ -78,7 +78,7 @@ function make_venv {
virtualenv -p $py_version $dest_dir;
fi
- $dest_dir/bin/easy_install --upgrade setuptools pip;
+ $dest_dir/bin/easy_install --upgrade setuptools pip twine;
}
function build_docs {
@@ -94,21 +94,19 @@ function release_implementation {
# Build options. if no dry run, then upload to pypi
local setup_options=" sdist bdist_wheel ";
- if [ -z $DRY_RUN ]; then
- setup_options="$setup_options upload";
- fi
-
- # If using test index, add it to upload options
- if [ ! -z $TEST_PYPI_INDEX ]; then
- setup_options="$setup_options -r https://testpypi.python.org/pypi";
- fi
# Build [and upload to pypi] project
python $SCRIPTPATH/setup.py $setup_options;
- if [ -z $DRY_RUN ] && [ -z $TEST_PYPI_INDEX ] && [ -z $NO_DOCS ]; then
+ # If using test index, add it to upload options
+ if [ -z "$TEST_PYPI_INDEX" ]; then
+ python -m twine upload dist/*;
+ else
+ python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*;
+ fi
+
+ if [ -z $NO_DOCS ]; then
build_docs;
- python setup.py upload_docs;
fi
}
diff --git a/requirements-test.txt b/requirements-test.txt
new file mode 100644
index 0000000..1d3da55
--- /dev/null
+++ b/requirements-test.txt
@@ -0,0 +1,4 @@
+mock
+coverage
+anyfield
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..2f11cc2
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
+six>=1.10
+extend_me>=1.1.3
+setuptools>=18
+requests>=2.7
+simplejson
+
diff --git a/setup.py b/setup.py
index ff9992a..fcc2f2f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,13 @@
#!/usr/bin/env python
+# Copyright © 2014-2018 Dmytro Katyukha
+
+#######################################################################
+# This Source Code Form is subject to the terms of the Mozilla Public #
+# License, v. 2.0. If a copy of the MPL was not distributed with this #
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
+#######################################################################
+
import os.path
import sys
from setuptools import setup
@@ -11,6 +19,10 @@
version_file = os.path.join(os.path.dirname(__file__),
'odoo_rpc_client',
'version.py')
+requirements_file = os.path.join(os.path.dirname(__file__),
+ 'requirements.txt')
+test_requirements_file = os.path.join(os.path.dirname(__file__),
+ 'requirements-test.txt')
readme_file = os.path.join(os.path.dirname(__file__), 'README.rst')
if sys.version_info < (3,):
@@ -19,56 +31,55 @@
with open(version_file, 'rb') as f:
exec(compile(f.read(), version_file, 'exec'))
+with open(requirements_file, 'rt') as f:
+ requirements = f.readlines()
+
+with open(test_requirements_file, 'rt') as f:
+ test_requirements = f.readlines()
+
-setup(name='odoo_rpc_client',
- version=version,
- description='Odoo/OpenERP library for RPC',
- author='Dmytro Katyukha',
- author_email='firemage.dima@gmail.com',
- url='https://github.com/katyukha/odoo-rpc-client',
- long_description=open(readme_file).read(),
- packages=['odoo_rpc_client',
- 'odoo_rpc_client.connection',
- 'odoo_rpc_client.service',
- 'odoo_rpc_client.orm',
- 'odoo_rpc_client.tests',
- 'odoo_rpc_client.plugins',
- ],
- license="GPL",
- classifiers=[
- # 'Development Status :: 3 - Alpha',
- 'Development Status :: 4 - Beta',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: GNU General Public License (GPL)',
- '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 :: Implementation :: CPython',
- 'Topic :: Utilities',
- 'Topic :: Software Development :: Libraries',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
- keywords=['odoo', 'odoo-rpc', 'rpc', 'xmlrpc',
- 'xml-rpc', 'json-rpc', 'jsonrpc', 'odoo-client', 'openerp'],
- extras_require={
- 'all': ['anyfield'],
- },
- install_requires=[
- 'six>=1.10',
- 'extend_me>=1.1.3',
- 'setuptools>=18',
- 'requests>=2.7',
- 'simplejson',
- ],
- tests_require=[
- 'mock',
- 'coverage',
- 'anyfield',
- ],
- test_suite='odoo_rpc_client.tests.all',
+setup(
+ name='odoo_rpc_client',
+ version=version,
+ description='Odoo library for RPC',
+ author='Dmytro Katyukha',
+ author_email='dmytro.katyukha@gmail.com',
+ url='https://gitlab.com/katyukha/odoo-rpc-client',
+ long_description=open(readme_file).read(),
+ packages=[
+ 'odoo_rpc_client',
+ 'odoo_rpc_client.connection',
+ 'odoo_rpc_client.service',
+ 'odoo_rpc_client.orm',
+ 'odoo_rpc_client.tests',
+ 'odoo_rpc_client.plugins',
+ ],
+ license="MPL 2.0",
+ 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 :: Utilities',
+ 'Topic :: Software Development :: Libraries',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ ],
+ keywords=[
+ 'odoo', 'odoo-rpc', 'rpc', 'xmlrpc',
+ 'xml-rpc', 'json-rpc', 'jsonrpc', 'odoo-client', 'openerp'],
+ extras_require={
+ 'all': ['anyfield'],
+ },
+ install_requires=requirements,
+ tests_require=test_requirements,
+ test_suite='odoo_rpc_client.tests.all',
)