CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In a custom module, I have this piece of code :
cr, uid, context, pool = request.cr, request.uid, request.context, request.registry
_logger.error("uid :: %s", str(uid))
The logger returns the value of the current user. Good.
But where does « request.uid » take his value? I can't find the python code for this...
Thanks to help
You can see the request.uid is taking vaule inside the file : /openerp/addons/base/ir/ir_http.py.
There is one method named : _auth_method_public
if not request.session.uid:
dummy, request.uid = self.pool['ir.model.data'].get_object_reference(request.cr, openerp.SUPERUSER_ID, 'base', 'public_user')
request.uid = request.session.uid
Also, Inside website module this method is inherited to manage request.uid according to website configuration.
I am sure this will guide you in right direction.
About This Community
Odoo Training Center
|Asked: 8/12/15, 8:19 AM|
|Seen: 1102 times|
|Last updated: 8/13/15, 4:51 AM|