[FIX] py.js: add the name of value to display error when debugging.
authorChristophe Matthieu <chm@openerp.com>
Fri, 4 Jan 2013 14:00:00 +0000 (15:00 +0100)
committerChristophe Matthieu <chm@openerp.com>
Fri, 4 Jan 2013 14:00:00 +0000 (15:00 +0100)
bzr revid: chm@openerp.com-20130104140000-22t1wj95jp7ro2ho

addons/web/static/lib/py.js/lib/py.js

index 4ef92b4..8d6443b 100644 (file)
@@ -521,7 +521,7 @@ var py = {};
         }
     };
     py.PY_getAttr = function (o, attr_name) {
-        return PY_ensurepy(o.__getattribute__(attr_name));
+        return PY_ensurepy(o.__getattribute__(attr_name),attr_name);
     };
     py.PY_str = function (o) {
         var v = o.__str__();
@@ -998,7 +998,7 @@ var py = {};
             }
             var t = py.PY_call(py.tuple);
             for(var i=0; i<ar.length; ++i) {
-                t._values.push(PY_ensurepy(ar[i]));
+                t._values.push(PY_ensurepy(ar[i],i));
             }
             return t;
         }
@@ -1032,7 +1032,7 @@ var py = {};
                 if (!d.hasOwnProperty(k)) { continue; }
                 instance.__setitem__(
                     py.str.fromJSON(k),
-                    PY_ensurepy(d[k]));
+                    PY_ensurepy(d[k],k));
             }
             return instance;
         },