openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01476
Point of Sale hardware
Hi all,
I am starting to play around with the point of sale functionality, I got
a little receipt printer (standard ESC/POS stuff) and I am interested in
getting other POS hardware like scales/touchscreen/lights/cashdrawer.
looking at the code it seems the web client talks back to the server via
a proxy service to control the hardware (to get out of the webbrowser
sandbox)
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/point_of_sale/static/src/js/devices.js
it seems to connect to localhost:8069 by default, so I think some python
is supposed to run on the till computer that provides a web interface to
the hardware, as far as I can make out the code talks fine to an OpenERP
server and calls bits of the PointOfSaleController controller class that
is implemented as a stub in this file:
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/point_of_sale/controllers/main.py
so that gets called, but all it does is print out the content of the
request, so for example the print_receipt method is defined like this:
@openerp.addons.web.http.jsonrequest
def print_receipt(self, request, receipt):
print 'print_receipt' + str(receipt)
return
I think the intention is that this class would be extended with further
modules to provide actual hardware interfaces (so it would send ESC/POS
code to a USB attached printer for example)
So my questions now are as follows: have I understood this right? is
there any documentation I should be looking at rather than reading the
code? Has anyone got a PointOfSaleController class that drives real
hardware?
Alan.
--
I work at http://libertus.co.uk
Follow ups