I have been trying for days to fix this problem. Any help would be greatly appreciated:
I have a function:
class res_users(osv.osv):
_inherit="res.users"
def change_value(self,cr,uid)
self.write(cr,uid,uid,{'token1':'a'})
return True
I need to call this from an http.Controller class:
class something(http.Controller):
def call_users(self,data):
registry = openerp.modules.registry.RegistryManager.get('test')
cr=registry.cursor()
uid=request.session.uid
registry.get('res.users').change_value(cr,uid)
cr.close()
The whole thing executes without any issues and the function does get called and the write() function even returns True but no values are not written into the database! token1 field is still empty after execution.
I tried calling the change_value() from Javascript, and it works properly. I have no clue what's going on. Can anyone please help?