[IMP] hw_proxy, hw_escpos: it is now possible to add support for new printers from...
[odoo/odoo.git] / addons / hw_proxy / controllers / main.py
index 9e94e48..ea9b45c 100644 (file)
@@ -97,6 +97,22 @@ class Proxy(http.Controller):
             device_name = device[device.find('ID')+2:]
             resp+= "<div class='device' data-device='"+device+"'>"+device_name+"</div>\n"
         resp += "</div>\n"
+        resp += """
+            <h2>Add New Printer</h2>
+            <p>
+            Copy and paste your printer's device description in the form below. You can find
+            your printer's description in the device list above. If you find that your printer works
+            well, please send your printer's description to <a href='mailto:support@openerp.com'>
+            support@openerp.com</a> so that we can add it to the default list of supported devices.
+            </p>
+            <form action='/hw_proxy/escpos/add_supported_device' method='GET'>
+                <input type='text' style='width:400px' name='device_string' placeholder='123a:b456 Sample Device description' />
+                <input type='submit' value='submit' />
+            </form>
+            <h2>Reset To Defaults</h2>
+            <p>If the added devices cause problems, you can <a href='/hw_proxy/escpos/reset_supported_devices'>Reset the
+            device list to factory default.</a> This operation cannot be undone.</p>
+        """
         resp += "</body>\n</html>\n\n"
 
         return request.make_response(resp,{