Login error OERP v8.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OERPLib |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I was trying to pass mi code from v6.1 to v8.0 and when i'm trying to connect to my OERP server login doesn't work.
oerp = oerplib.
The oerp object is succesfully returned and i checked using for example oerp.db.list() and it works, but when i do
oerp.login(
try:
oerp = oerplib.
user = oerp.login(
return oerp
except:
return False
Always return False when i call this function for make the connect and i have another error from xmlrpclib that i didn't have before.
1 Traceback (most recent call last):
File "/opt/openerp/
response = xmlrpclib.
File "/usr/lib/
data = m.dumps(params)
File "/usr/lib/
dump(v, write)
File "/usr/lib/
f(self, value, write)
File "/usr/lib/
dump(v, write)
File "/usr/lib/
f(self, value, write)
File "/usr/lib/
dump(v, write)
File "/usr/lib/
f(self, value, write)
File "/usr/lib/
raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled
Hi,
This is due to a bug in Odoo, some fields on the 'res.users' and 'res.partner' models return None instead of False. /github. com/odoo/ odoo/pull/ 1284
I reported this bug and made a Pull Request to Odoo : https:/
Not merged yet, we have to wait (or patch Odoo ourself).
Another solution is to make a raw login:
>>> oerp = oerplib.OERP(...) login(' DB', 'LOGIN', 'PASSWD') 'res.users' , 'context_get')
>>> oerp._uid = oerp.common.
>>> oerp._password = 'PASSWD'
>>> oerp._context = oerp.execute(
>>> # Use 'oerp' as before
But you can expect the bug you mention as soon as you read a 'res.users' or 'res.partner' record (maybe others?), so I don't know if it suits your needs...
Regards,