summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/py.js
diff options
context:
space:
mode:
authorqdp-odoo <qdp@odoo.com>2015-05-05 17:28:04 +0200
committerqdp-odoo <qdp@odoo.com>2015-05-05 17:28:04 +0200
commitc04065abd8f62c9a211c8fa824f5eecf68e61b73 (patch)
treeb7117fd5f7d4a02d4c89b97c65cc8c8c462de4c1 /addons/web/static/lib/py.js
parentf09b118659c8bdd1c51000eab5ba3e9ef13724d4 (diff)
[IMP] accounting v9. Yeeeeaah
Diffstat (limited to 'addons/web/static/lib/py.js')
-rw-r--r--addons/web/static/lib/py.js/lib/py.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web/static/lib/py.js/lib/py.js b/addons/web/static/lib/py.js/lib/py.js
index 35bb0b5223e..40e3110857a 100644
--- a/addons/web/static/lib/py.js/lib/py.js
+++ b/addons/web/static/lib/py.js/lib/py.js
@@ -1006,7 +1006,12 @@ var py = {};
return t;
}
});
- py.list = py.tuple;
+ py.list = py.type('list', null, {
+ __nonzero__: function () {
+ return this.__len__ > 0 ? py.True : py.False;
+ },
+ });
+ _.defaults(py.list, py.tuple) // Copy attributes not redefined in type list
py.dict = py.type('dict', null, {
__init__: function () {
this._store = {};