X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fopenerp7_burette%2Frun;fp=etc%2Fsv%2Fopenerp7_burette%2Frun;h=bde5ee401dcac06bd945bf7dcd36e22acd036476;hb=45964cf455e18065d4575b60516fab0037bc5d8f;hp=822c08146ec1833b8283117b6fa8d55c82409d81;hpb=15298586388e386bfbec5e270c1b2da6cbdaf924;p=lhc%2Fateliers.git diff --git a/etc/sv/openerp7_burette/run b/etc/sv/openerp7_burette/run index 822c081..bde5ee4 100755 --- a/etc/sv/openerp7_burette/run +++ b/etc/sv/openerp7_burette/run @@ -12,15 +12,17 @@ export LOGNAME="$sv" /usr/bin/patch --forward --reject-file=- --strip=0 --unified <<-EOF --- /usr/share/pyshared/openerp/addons/web/controllers/main.py 2013-12-01 05:06:50.121954391 +0100 +++ /usr/share/pyshared/openerp/addons/web/controllers/main.py 2013-12-01 05:07:44.917954389 +0100 - @@ -90,6 +90,8 @@ + @@ -90,6 +90,11 @@ h = req.httprequest.environ['HTTP_HOST'].split(':')[0] d = h.split('.')[0] r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d) - + f = req.httprequest.environ['HTTP_OPENERP_DB_FILTER'] - + r = r.replace('%f', f) + + try: + + f = req.httprequest.environ['HTTP_OPENERP_DB_FILTER'] or '' + + r = r.replace('%f', f) + + except KeyError: + + pass dbs = [i for i in dbs if re.match(r, i)] return dbs - EOF for db in \