service Package


Return service class specified by it’s name

class openerp_proxy.service.ServiceBase(service, client, name)[source]

Bases: object

Base class for all Services

  • service – instance of original service class. must support folowing syntax service.service_method(args) to call remote methods
  • client – instance of Client, this service is binded to

To be implemented by subclasses, if needed


Related Client instance


Service name

class openerp_proxy.service.ServiceManager(client)[source]

Bases: extend_me.Extensible, odoo_rpc_client.utils.DirMixIn

Class to hold services related to specific client and to automaticaly clean service cached on update of service classes


services = ServiceManager(client)
services.service_list          # get list of registered services
services.object                # returns service with name 'object'
services['common']             # returns service with name 'common'
services.get_service('report') # returns service named 'report'

Cleans manager’s service cache.

classmethod clean_caches()[source]

Cleans saved service instances, so on next access new service instances will be generated. This usualy happens when new service extension enabled (new class inherited from ServiceBase created)


Clean caches of all services handled by this mananger usualy this should be called on module update, when list of available objects or reports changed


Client instance this ServiceManager is bounded to


Returns instance of service with specified name

Parameters:name – name of service
Returns:specified service instance

Returns list of all registered services

db Module

object Module

report Module

Report printing logic

Best way to generate report is:

data_records = client['res.partner'].search_records([], limit=10)
report =['res.partner'].generate(data_records)

Or if it is desired to save it on disk:

data_records = client['res.partner'].search_records([], limit=10)
report =['res.partner'].generate(data_records)'filename to save report with')

where report is instance of ReportResult and report.content returns already base64 decoded content of report, which could be directly written to file (or just use method)

service Module