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 which manage the configuration of an ODOO instance.
Note
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')
'7.0'
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')
False
Returns: | the version as tuple |
---|