SMTPClient : Read() method does not set **** to all Passwords and assumed ids as list

Bug #939415 reported by Serpent Consulting Services
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
Bipin Rathod(SerpentCS)

Bug Description

hello am using smtp client of:
Tiny/Axelor 2/18/12 6.0 1.0 lp:openobject-addons/extra-6.0
i installed it successfully and tried to configure the email server.and when i pressed the save button it showed the following error:
Traceback (most recent call last):
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/addons/audittrail/audittrail.py", line 518, in execute
res = my_fct(db, uid, model, method, *args)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/addons/audittrail/audittrail.py", line 502, in my_fct
return fct_src(db, uid_orig, model, method, *args)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/addons/smtpclient/smtpclient.py", line 166, in read
result = override_password(result)
File "/home/pravitha/workspace/openERP/src/openerp-server/bin/addons/smtpclient/smtpclient.py", line 160, in override_password
for field in o[0]:
KeyError: 0

does anyone know how to resolve it?please

_________________
Regards,
Nightfury

Related branches

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Thanks to Nightfury for Reporting an Bipin for the fix.

Some notes:
There were 2 errors.

1. Read() always assumed the ids to be a list, but it fails when audittrail module reads the logs by ids in integer format.
2. The o[0] was setting ******** only for the very first read record due to 0th index.

The merge proposed by Bipin fixes both the issues.

As a part of the community, I am mergin the request to extra-addons/6.0.

Thanks.

Changed in openobject-addons:
status: New → Confirmed
assignee: nobody → Serpent Consulting Services (serpent-consulting-services)
assignee: Serpent Consulting Services (serpent-consulting-services) → Bipin Rathod(SerpentCS) (brathod-serpentcs)
importance: Undecided → Low
Changed in openobject-addons:
status: Confirmed → Fix Released
summary: - SMTClient : Read() method does not set **** to all Passwords and assumed
- ids as list
+ SMTPClient : Read() method does not set **** to all Passwords and
+ assumed ids as list
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.