Using python-rq for OpenObject tasks.
- For OpenERP v5 the module versions are
v1.X.X
or below and branch isapi_v5
- For OpenERP v6 the module versions are
v2.X.X
and branch isapi_v6
- For OpenERP v7 the module versions are
v3.X.X
and branch isapi_v7
from osv import osv
from oorq.decorators import job
class ResPartner(osv.osv):
_name = 'res.partner'
_inherit = 'res.partner'
@job(async=True)
def write(self, cursor, user, ids, vals, context=None):
res = super(ResPartner,
self).write(cursor, user, ids, vals, context)
return res
ResPartner()
$ PYTHONPATH=~/Projects/OpenERP/server/bin:~/Projects/OpenERP/server/bin/addons rq worker
Do fun things :)