[IMP] posbox: add a homepage to the root controller on the posbox that explains what...
[odoo/odoo.git] / addons / hw_posbox_homepage / controllers / main.py
1 # -*- coding: utf-8 -*-
2 import logging
3 import os
4 import time
5 from os import listdir
6
7 import openerp
8 from openerp import http
9 from openerp.http import request
10 from openerp.tools.translate import _
11
12 _logger = logging.getLogger(__name__)
13
14 index_template = """
15 <!DOCTYPE HTML>
16 <html>
17     <head>
18         <title>OpenERP's PosBox</title>
19         <style>
20         body {
21             width: 480px;
22             margin: 60px auto;
23             font-family: sans-serif;
24             text-align: justify;
25             color: #6B6B6B;
26         }
27         </style>
28     </head>
29     <body>
30         <h1>Your PosBox is up and running</h1>
31         <p>
32         The PosBox is an hardware adapter that allows you to use 
33         receipt printers and barcode scanners with OpenERP's Point of
34         Sale, <b>version 8.0 or later</b>. You can start an <a href='https://www.openerp.com/start'>online free trial</a>,
35         or <a href='https://www.openerp.com/start?download'>download and install</a> it yourself.
36         </p>
37         <p>
38         For more information on how to setup the Point of Sale with
39         the PosBox, please refer to <a href='/hw_proxy/static/doc/manual.pdf'>the manual</a>
40         </p>
41         <p>
42         To see the status of the connected hardware, please refer 
43         to the <a href='/hw_proxy/status'>hardware status page</a>
44         </p>
45         <p>
46         The PosBox software installed on this posbox is <b>version 6</b>, 
47         the posbox version number is independent from OpenERP. You can upgrade
48         the software on the <a href='/hw_proxy/upgrade/'>upgrade page</a>
49         </p>
50         <p>For any other question, please contact the OpenERP support at <a href='mailto:support@openerp.com'>support@openerp.com</a>
51         </p>
52     </body>
53 </html>
54
55 """
56
57
58 class PosboxHomepage(openerp.addons.web.controllers.main.Home):
59     @http.route('/', type='http', auth='none', website=True)
60     def index(self):
61         #return request.render('hw_posbox_homepage.index',mimetype='text/html')
62         return index_template
63