[FIX] authenticate optional env
bzr revid: al@openerp.com-20120812151532-gqt8dcqo6f5t2szb
This commit is contained in:
parent
9211174a6f
commit
6a78b5dbd9
|
@ -68,7 +68,7 @@ class OpenERPSession(object):
|
|||
self._login = login
|
||||
self._password = password
|
||||
|
||||
def authenticate(self, db, login, password, env):
|
||||
def authenticate(self, db, login, password, env=None):
|
||||
# TODO use the openerplib API once it exposes authenticate()
|
||||
uid = self.proxy('common').authenticate(db, login, password, env)
|
||||
self.bind(db, uid, login, password)
|
||||
|
|
|
@ -34,7 +34,6 @@ openerpweb = common.http
|
|||
# OpenERP Web web Controllers
|
||||
#----------------------------------------------------------
|
||||
|
||||
|
||||
def concat_xml(file_list):
|
||||
"""Concatenate xml files
|
||||
|
||||
|
@ -63,7 +62,6 @@ def concat_xml(file_list):
|
|||
root.append(child)
|
||||
return ElementTree.tostring(root, 'utf-8'), checksum.hexdigest()
|
||||
|
||||
|
||||
def concat_files(file_list, reader=None, intersperse=""):
|
||||
""" Concatenates contents of all provided files
|
||||
|
||||
|
@ -91,27 +89,6 @@ def concat_files(file_list, reader=None, intersperse=""):
|
|||
files_concat = intersperse.join(files_content)
|
||||
return files_concat, checksum.hexdigest()
|
||||
|
||||
html_template = """<!DOCTYPE html>
|
||||
<html style="height: 100%%">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>OpenERP</title>
|
||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/web/static/src/css/full.css" />
|
||||
%(css)s
|
||||
%(js)s
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var s = new openerp.init(%(modules)s);
|
||||
%(init)s
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
def sass2scss(src):
|
||||
# Validated by diff -u of sass2scss against:
|
||||
# sass-convert -F sass -T scss openerp.sass openerp.scss
|
||||
|
@ -237,6 +214,27 @@ def make_conditional(req, response, last_modified=None, etag=None):
|
|||
response.set_etag(etag)
|
||||
return response.make_conditional(req.httprequest)
|
||||
|
||||
html_template = """<!DOCTYPE html>
|
||||
<html style="height: 100%%">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>OpenERP</title>
|
||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/web/static/src/css/full.css" />
|
||||
%(css)s
|
||||
%(js)s
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var s = new openerp.init(%(modules)s);
|
||||
%(init)s
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
class Home(openerpweb.Controller):
|
||||
_cp_path = '/'
|
||||
|
||||
|
|
Loading…
Reference in New Issue