This module contains the Config class which manage the configuration related to an instance of ODOO, and some useful helper functions used internally in OdooRPC.

class odoorpc.tools.Config(odoo, options)

Class which manage the configuration of an ODOO instance.


This class have to be used through the odoorpc.ODOO.config property.

>>> import odoorpc
>>> odoo = odoorpc.ODOO('localhost')    
>>> type(odoo.config)
<class 'odoorpc.tools.Config'>

Clean a version string.

>>> from odoorpc.tools import clean_version
>>> clean_version('7.0alpha-20121206-000102')
Returns:a cleaner version string

Convert a version string to a tuple. The tuple can be use to compare versions between them.

>>> from odoorpc.tools import v
>>> v('7.0')
[7, 0]
>>> v('6.1')
[6, 1]
>>> v('7.0') < v('6.1')
Returns:the version as tuple