- Add support for the JSON-RPC protocol. It is enabled if the
--server
argument contains the full path to the/jsonrpc
endpoint. As an alternative, you can specify theprotocol
in the configuration file. - Change the return value of :meth:`Model.browse` method if search domain is
an empty list. It returns an empty
RecordList
except if some other argument is provided (e.g.all_users = model('res.users').browse([], limit=None)
). Compatibility tip: you can restore the old behavior withModel._browse_compat = True
. - Change the return value of
Client.read()
andModel.read()
methods if search domain is an empty list: it returnsFalse
. - Improve error formatting for recent Odoo versions, in interactive mode.
- Refactor the construction of
Service
proxies. - Drop compatibility with Python 2.6.
- Fully support Odoo 10 and Odoo 11.
- New method
Client.clone_database
based onClient.db.duplicate_database
. - Optional
login
andcountry_code
arguments forClient.create_database
in Odoo 9+. - Use the
context
for thesearch
methods. - Service
Client._report
is removed in Odoo 11. MethodsClient.report
,Client.report_get
andClient.render_report
are removed too. - More robust Python 2 detection logic.
- Do not parse long integers which overflow in XML-RPC.
- Add an optional
transport
argument to theClient
constructor. This is useful for tweaking the SSL context or adding an optional timeout parameter. - Implement
==
comparison forRecordList
instances. - Uninstall dependent add-ons in a single call.
- Do not install/uninstall add-ons if other actions are pending.
- Do not hang when the
Client
constructor receives invalid arguments. - Fix
str(record)
andprint(record)
with non-ASCII names.
- Support using
--env
and--user
together to connect with a different user. - Adapt for Odoo 8.0 after change
cc4fba6
on October 2014. - Do not interpret digits with leading
0
as octal in search domain.
- Compatible with Odoo 8.0.
- New attribute
Client.context
to set the default context for high-levelModel
andRecord
methods. - Use blocking RPC call in
Client.create_database
. Asynchronous method is removed in Odoo. - Return the interactive namespace with
main(interact=False)
. It helps to integrate with third-party libraries, such as IPython. - Remove a duplicate
Logged in as ...
line in interactive mode. - Remove the
search+name_get
undocumented feature which has wrong behavior when applied to an emptyRecordList
. - Do not prevent login if access to
Client.db.list()
is denied.
- When a function or a method fails, raise an
erppeek.Error
instead of printing a message and returningNone
. - Switch to local mode when the command line argument points at the
server configuration, like
-c path/to/openerp-server.conf
. - Local mode compatible with Odoo trunk: support both the old and the new API.
- Use shell-like parsing for
options =
setting in local mode. - Function
start_openerp_services
is replaced withstart_odoo_services
: it is still compatible with OpenERP 6.1 and 7 and it accepts a list of options in the first argument, similar tosys.argv[1:]
. - Search domains require square brackets. Usage without square brackets
was deprecated since 0.5, with
UserWarning
alerts. - Implement addition of
RecordList
of the same model. - Drop compatibility with Python 2.5.
- Change command line output to CSV format.
- Translate command line output according to LANG environment variable.
- Pretty print the list of modules.
- Do not report
Module(s) not found
when trying to install a module already installed.
- Return an appropriate error message when the client is not connected.
- Two similar
Record
from different connections do not compare equal. - Set the
PGAPPNAME
used for the PostgreSQL connection, in local mode. - Close PostgreSQL connections on exit, in local mode.
- Implement the context manager protocol.
- When switching to a different environment, with
Client.connect
, invalidate the previous connection to avoid mistakes (interactive mode). - Avoid cluttering the globals in interactive mode.
- Close socket to avoid
ResourceWarning
on Python 3. - The
get_pool
helper is only available in interactive mode and if the client is connected locally using theopenerp
package. - Clear the last exception before entering interactive mode, only needed on Python 2.
- Fix the
searchargs
domain parser for compatibility with Python 3.4.
- Advertize the
Model
andRecord
paradigm in theusage
printed in interactive mode: it's far more easier to use, and available since 1.0. - In interactive mode, only inject four global names:
client
,models
,model
anddo
. Other methods are available onModel
andClient
instances (read
search
count
keys
fields
access
...). - Always clear the
Record
cache when an arbitrary method is called on thisRecord
. - Implement
==
comparison forRecord
instances. - New computed attributes
Record._external_id
andRecordList._external_id
, and new methodModel._get_external_ids(ids=None)
. - Better parsing of dates in search terms.
- Reject invalid
==
operator in search terms. - Now the
str(...)
of aRecord
is always retrieved withname_get
. Previously, the output was sometimes inconsistent. - Fix
TypeError
when browsing duplicate ids. - Fix error with
Model.get(['field = value'], context={...})
. - Workaround an issue with some models: always pass a list of ids
to
read
. - Test the behaviour when
read
is called with aFalse
id: it happens when browsing aRecordList
for example.
- Extend
Model.get
to retrieve a record byxml_id
. - Fix AttributeError when reading a mix of valid and invalid records.
- Fix
dir()
onRecord
andRecordList
to return all declared fields, and do not reportid
field twice. - Fix a crash with built-in OS X readline on Python 2.5 or 2.6.
- Remove deprecated
Record.client
. - Fix compatibility with Python 3.
- Add optional argument
check
to theClient.model
method to bypass the verification in some cases, used to speed up the read methods. - Do not crash when mixing non-existing and existing records: return
always
False
for non-existing records.
- Compatible with OpenERP 7.
- Set the database name as thread attribute to print it in the log file (local mode only).
- Do not try to access private methods through RPC when resolving
attributes of the
Client
or anyRecord
orRecordList
.
- Add the
get_pool
helper when connected using theopenerp
library. - Remove the leading slash on the
server
option, if present. - Do not try to access private methods through RPC when reading attributes
of the
model(...)
.
- Fix reading
many2one
attribute onRecordList
object in local mode. - Fix occasional issue on login when switching database on the same server.
- Optimization: do not propagate the call to
RecordList.write
orRecordList.unlink
if the list is empty. - Clear the
Record
cache onRecord._send
. - Expose the method
Record.refresh
to clear the local cache.
- New: direct connection to a local server using the
openerp
library. Usescheme = local
andoptions = -c /path/to/openerp-server.conf
in the configuration.
- Fix method
Record._send
.
- Implement exception chaining in
format_exception
to print the original traceback. - Return a list of
Record
objects when reading thereference
field of aRecordList
object. - Fix reading attributes on
RecordList
with holes or gaps. - Accessing an empty
one2many
ormany2many
attribute on aRecord
returns aRecordList
. - New method
Model.get
to retrieve a singleRecord
. It raises aValueError
if multiple records are found. - New method
Record._send
to send a workflow signal.
- Accept
Record
andRecordList
attribute values when writing or creating records. - Improve the methods
write
andcreate
ofRecord
andRecordList
objects to manageone2many
andmany2many
fields. - Return a
Record
when reading areference
field. Implement thecreate
andwrite
methods for these fields. - Remove undocumented alias
Record.update
.
- Add the special operators
=ilike
,=ilike
,=?
and fix parsing of inequality operators>=
and<=
. - Fix the
RecordList.id
attribute, and deprecateRecordList._ids
. - Deprecate the
Record.client
attribute: useRecord._model.client
. - Accessing an empty
many2one
attribute on aRecordList
now returns aRecordList
. - Fix
TypeError
when browsing non-existent records.
- Catch some malformed search domains before sending the RPC request.
- Preserve dictionary response when calling non standard
Record
methods. - Expose the helper
format_exception
which formats the errors received through XML-RPC. - Support XML-RPC through HTTPS with
scheme = https
in theerppeek.ini
configuration file. - Print an error message when
client.upgrade(...)
does not find any module to upgrade.
- When using arbitrary methods on
Record
, wrap theid
in a list[id]
. It fixes a recurring issue with poorly tested methods. - Do not read all records if the
RecordList
is empty. - Fix the bad behaviour when switching to a different database.
- Order the results when using
read
method withorder=
argument. - Reading attributes of the sequence
<RecordList 'sea.fish,[2, 1, 2]'>
will return an ordered sequence of three items. Previously it used to return an unordered sequence of two items. - Accept the
%(...)s
formatting for the fields parameter of theRecord.read
and theRecordList.read
methods too. - Add a tutorial to the documentation.
- Add the test suite for Python 2 and Python 3.
- Implement
len()
forRecordList
objects. - Connect to the server even if the database is missing.
- Expose the method
Client.db.get_progress
. - New method
Client.create_database
which wraps togetherClient.db.create
andClient.db.get_progress
. - Save the readline history in
~/.erppeek_history
, only if the file already exists. - Enable auto-completion using
rlcompleter
standard module. - Raise an
AttributeError
when assigning to a missing or read-only attribute.
- Enhance the
Model.browse()
method to accept the same keyword arguments as theClient.search()
method. - Fix the verbose level on
Client.connect()
. - Fix the
Record.copy()
method. - Fix the
Record.perm_read()
method (workaround an OpenERP bug when dealing with single ids). - Drop the
--search
argument, because the search terms can be passed as positional arguments after the options. Explain it in the description. - Fix the shell command. Request the password interactively if it's not in the options and not in the configuration file.
- Add the
--verbose
switch to log the XML-RPC messages. Lines are truncated at 79 chars. Use-vv
or-vvv
to truncate at 179 or 9999 chars respectively. - Removed the
--write
switch because it's not really useful. Use :meth:`Record.write` or :meth:`client.write` for example. - Stop raising RuntimeError when calling
Client.model(name)
. Simply print the message if the name does not match. - Fix
RecordList.read()
andRecord.read()
methods to accept the same diversity offields
arguments as theClient.read()
method. RecordList.read()
andRecord.read()
return instances ofRecordList
andRecord
for relational fields.- Optimize: store the name of the
Record
when a relational field is accessed. - Fix message wording on module install or upgrade.
- Fix
Record.write()
andRecord.unlink()
methods. - Fix the caching of the
Model
keys and fields and theRecord
name.
- Fix
client.model()
method. Addmodels()
to theglobals()
in interactive mode.
- Add the Active Record pattern for convenience. New classes :class:`Model`,
:class:`RecordList` and :class:`Record`. The :meth:`Client.model` method
now returns a single :class:`Model` instance. These models can be
reached using camel case attribute too. Example:
client.model('res.company')
andclient.ResCompany
return the same :class:`Model`. - Refresh the list of modules before install or upgrade.
- List all modules which have
state not in ('uninstalled', 'uninstallable')
when callingclient.modules(installed=True)
. - Add documentation.
- Fix
help(client)
andrepr(...)
. - Add basic safeguards for argument types.
- Fix RuntimeError on connection.
- Support Python 3.
- Return Client method instead of function when calling
client.write
or similar. - Fix the case where :meth:`~Client.read()` is called with a single id.
- Implement
Client.__getattr__
special attribute to call any object method, likeclient.write(obj, values)
. This is somewhat redundant withclient.execute(obj, 'write', values)
and its interactive aliasdo(obj, 'write', values)
. - Add
--write
switch to enable unsafe helpers:write
,create
,copy
andunlink
. - Tolerate domain without square brackets, but show a warning.
- Add long options
--search
for-s
,--interact
for-i
.
- Workaround for
sys.excepthook
ignored, related to a Python issue.
- Add
--config
and--version
switches. - Improve documentation with session examples.
- Move the project from Launchpad to GitHub.
- Allow to switch user or database: methods
client.login
andclient.connect
. - Allow
context=
keyword argument. - Add
access(...)
method. - Add
%(...)s
formatting for the fields parameter of theread(...)
method. - Refactor the interactive mode.
- Many improvements.
- Publish on PyPI.
- Initial release.