** Branch linked: lp:openobject-server

-- 
exception in orm.py if res2[record['id']] is False
https://bugs.launchpad.net/bugs/625898
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Server: New

Bug description:
I fixed this some time ago and no longer have the traceback.

The following change fixes the problem:


=== modified file 'bin/osv/orm.py'
--- bin/osv/orm.py      2010-08-12 20:08:48 +0000
+++ bin/osv/orm.py      2010-08-26 04:28:07 +0000
@@ -2947,7 +2947,10 @@
                 for pos in val:
                     for record in res:
                         if isinstance(res2[record['id']], 
str):res2[record['id']] = eval(res2[record['id']]) #TOCHECK : why got string 
instend of dict in python2.6
-                        record[pos] = res2[record['id']][pos]
+                        if res2[record['id']]:
+                            record[pos] = res2[record['id']][pos]
+                        else:
+                            record[pos] = []
             else:
                 for f in val:
                     res2 = self._columns[f].get(cr, self, ids, f, user, 
context=context, values=res)

Applies to revision 2572, trunk



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to