summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-06-29 17:34:44 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-06-29 17:34:44 +0200
commitc2ceeb2c6fbdefcb858957add87fdf144ab66ea7 (patch)
tree08f597567b11c21a3e9fe3b4befad0442fbacbb5
parent42a474d8eea7b33d1d906a458835579399c85bb0 (diff)
parent25a1a7fba0e3f53c134b81722203d18acea05546 (diff)
[merge]
bzr revid: nicolas.vanhoren@openerp.com-20110629153444-tngz8b9p7zg7e4u4
-rw-r--r--addons/base/controllers/main.py15
-rw-r--r--addons/base/static/src/js/list.js4
2 files changed, 9 insertions, 10 deletions
diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py
index 9869adad92a..7098f7f8f90 100644
--- a/addons/base/controllers/main.py
+++ b/addons/base/controllers/main.py
@@ -237,7 +237,7 @@ def eval_context_and_domain(session, context, domain=None):
# should we give the evaluated context as an evaluation context to the domain?
e_domain = session.eval_domain(domain or [])
- return (e_context, e_domain)
+ return e_context, e_domain
def load_actions_from_ir_values(req, key, key2, models, meta, context):
Values = req.session.model('ir.values')
@@ -438,21 +438,20 @@ class DataSet(openerpweb.Controller):
return {'result': r}
@openerpweb.jsonrequest
- def unlink(self, request, model, ids=[]):
+ def unlink(self, request, model, ids=()):
Model = request.session.model(model)
return Model.unlink(ids, request.session.eval_context(request.context))
def call_common(self, req, model, method, args, domain_id=None, context_id=None):
domain = args[domain_id] if domain_id and len(args) - 1 >= domain_id else []
context = args[context_id] if context_id and len(args) - 1 >= context_id else {}
- c, d = eval_context_and_domain(req.session, context, domain);
- if(domain_id and len(args) - 1 >= domain_id):
+ c, d = eval_context_and_domain(req.session, context, domain)
+ if domain_id and len(args) - 1 >= domain_id:
args[domain_id] = d
- if(context_id and len(args) - 1 >= context_id):
+ if context_id and len(args) - 1 >= context_id:
args[context_id] = c
- m = req.session.model(model)
- return getattr(m, method)(*args)
+ return getattr(req.session.model(model), method)(*args)
@openerpweb.jsonrequest
def call(self, req, model, method, args, domain_id=None, context_id=None):
@@ -713,7 +712,7 @@ class Binary(openerpweb.Controller):
for key, val in cherrypy.request.headers.iteritems():
headers[key.lower()] = val
size = int(headers.get('content-length', 0))
- # TODO: might be usefull to have a configuration flag for max-lenght file uploads
+ # TODO: might be useful to have a configuration flag for max-length file uploads
try:
out = """<script language="javascript" type="text/javascript">
var win = window.top.window,
diff --git a/addons/base/static/src/js/list.js b/addons/base/static/src/js/list.js
index 31c16b98fc1..62bedf8784d 100644
--- a/addons/base/static/src/js/list.js
+++ b/addons/base/static/src/js/list.js
@@ -36,7 +36,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
* @param {Boolean} [options.selectable=true] determines whether view rows are selectable (e.g. via a checkbox)
* @param {Boolean} [options.header=true] should the list's header be displayed
* @param {Boolean} [options.deletable=true] are the list rows deletable
- * @param {null|String} [options.addable="New"] should the new-record button be displayed, and what should its label be. Use ``null`` to hide the button.
+ * @param {void|String} [options.addable="New"] should the new-record button be displayed, and what should its label be. Use ``null`` to hide the button.
* @param {Boolean} [options.sortable=true] is it possible to sort the table by clicking on column headers
* @param {Boolean} [options.reorderable=true] is it possible to reorder list rows
*
@@ -232,7 +232,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
* If the index is null, ``switch_to_record`` asks for the creation of a
* new record.
*
- * @param {Number|null} index the record index (in the current dataset) to switch to
+ * @param {Number|void} index the record index (in the current dataset) to switch to
* @param {String} [view="form"] the view type to switch to
*/
select_record:function (index, view) {