diff --git a/addons/stock/controllers/main.py b/addons/stock/controllers/main.py
index ad8aa8826af..fa2744a4498 100644
--- a/addons/stock/controllers/main.py
+++ b/addons/stock/controllers/main.py
@@ -1,57 +1,11 @@
# -*- coding: utf-8 -*-
import logging
-import simplejson
from openerp import http
from openerp.http import request
-from openerp.addons.web.controllers.main import module_boot
_logger = logging.getLogger(__name__)
-html_template = """
-
-
- Barcode Scanner
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-"""
-
class BarcodeController(http.Controller):
@http.route(['/barcode/web/'], type='http', auth='user')
@@ -59,16 +13,4 @@ class BarcodeController(http.Controller):
if not request.session.uid:
return http.local_redirect('/web/login?redirect=/barcode/web')
- r = html_template % {
- 'modules': simplejson.dumps(module_boot(request.db)),
- 'init': """
- var wc = new s.web.WebClient();
- wc.show_application = function(){
- wc.action_manager.do_action("stock.ui", {});
- };
- wc.do_push_state = function(state){};
- wc.setElement($(document.body));
- wc.start();
- """
- }
- return r
+ return request.render('stock.barcode_index')
diff --git a/addons/stock/views/stock.xml b/addons/stock/views/stock.xml
index a38fe9bb9fe..f5bca7a8f7c 100644
--- a/addons/stock/views/stock.xml
+++ b/addons/stock/views/stock.xml
@@ -3,11 +3,64 @@
-->
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+<!DOCTYPE html>
+
+
+ Barcode Scanner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+