[FIX] standalone client

bzr revid: al@openerp.com-20120812215517-qxqnd1fvc9hcxezh
This commit is contained in:
Antony Lesuisse 2012-08-12 23:55:17 +02:00
parent aa93e7186d
commit 1d0c2968ce
1 changed files with 11 additions and 3 deletions

View File

@ -1,11 +1,19 @@
#!/usr/bin/env python
from openerp.addons.web.common import http as oeweb
import werkzeug
class Mobile(oeweb.Controller):
try:
# embedded
import openerp.addons.web.common.http as openerpweb
from openerp.addons.web.controllers.main import View
except ImportError:
# standalone
import web.common.http as openerpweb
from web.controllers.main import View
class Mobile(openerpweb.Controller):
_cp_path = '/mobile'
@oeweb.httprequest
@openerpweb.httprequest
def index(self, req):
return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301)