openpymemx / proxypos Goto Github PK
View Code? Open in Web Editor NEWProsyPoS to use as a driver for PoS devices to use with OpenERP
License: MIT License
ProsyPoS to use as a driver for PoS devices to use with OpenERP
License: MIT License
After I make a purchase the cashdrawer opens and nothing else. If I uncheck the cashdrawer interface, it prints only one receipt and second time it tells me that resource busy. Im using Ubuntu
Hi i have just tried to install this proxy to print from openerp. i Cannot print any receipt i kept getting errors related to python yaml.
Traceback (most recent call last):
File "/home/proxypos/proxypos/proxypos/app.py", line 44, in do_print
device = printer.device()
File "/home/proxypos/proxypos/proxypos/controlers/printer.py", line 52, in init
self.config = yaml.load(f.read())
File "/usr/local/lib/python2.7/dist-packages/yaml/init.py", line 71, in load
return loader.get_single_data()
File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
"expected , but found %r" % token.id, token.start_mark)
ParserError: while parsing a block mapping
in "", line 2, column 1:
printer:
^
expected , but found ''
in "", line 6, column 3:
settings:
^
2014-06-05 11:17:37,679 - proxypos.app - INFO - Procesing /pos/print_receipt GET method
2014-06-05 11:17:37,680 - proxypos.app - INFO - Already printed receipt by POST methodTraceback (most recent call last):
File "/home/proxypos/proxypos/proxypos/app.py", line 44, in do_print
device = printer.device()
File "/home/proxypos/proxypos/proxypos/controlers/printer.py", line 52, in init
self.config = yaml.load(f.read())
File "/usr/local/lib/python2.7/dist-packages/yaml/init.py", line 71, in load
return loader.get_single_data()
File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
"expected , but found %r" % token.id, token.start_mark)
ParserError: while parsing a block mapping
in "", line 2, column 1:
printer:
^
expected , but found ''
in "", line 6, column 3:
settings:
^
2014-06-05 11:17:37,679 - proxypos.app - INFO - Procesing /pos/print_receipt GET method
2014-06-05 11:17:37,680 - proxypos.app - INFO - Already printed receipt by POST method
Im using debian stable (wheezy), using crunchgbag distro. trying to work out this issue i have installed pyyaml using pip. The printing fails both with pyyaml from pip and python-yaml from debian repos.
Also here are some corrections to the install instructions:
You need to install also python-simplejson, it is not listed as dependency.
the adduser command is not working, you have to use useradd ( at least in debian).
Hello, after a while im back at looking at your library.
I have succesfully set up everything, and it almost working with openerp 7
However when printing the receipt from openerp i get the following error, in character encoding. The printing stops and it just prints a few lines, but it does print a little.
The character that stops the printing is an é
I get the foillowing error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/app.py", line 90, in do_print
device.print_receipt(receipt)
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/controlers/printer.py", line 85, in print_receipt
self._write(str(receipt['company']['contact_address']) + '\n')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 60: ordinal not in range(128)
I have tried enabling the different encodings in the yaml config file, even enabling every encoding at the same time doesn't solve the problem.
I have installed proxyPos last version from master.
Also the python ESC/POS from your repo, master branch also.
Im using Debian Wheezy.
Version of the python libraries, some installed using pip, others with apt.
PIL==1.1.7
PyYAML==3.10
chardet==2.0.1
escpos==2.7
numpy==1.6.2
obMenu==1.0
paramiko==1.7.7.1
pexpect==2.4
proxypos==1.2.0
pycrypto==2.6
pycurl==7.19.0
pyserial==2.5
python-apt==0.8.8.2
python-debian==0.1.21
python-xlib==0.14
pyusb==1.0.0b2
pyxdg==0.19
qrcode==5.1
rpl==1.5.5
simplejson==2.5.2
six==1.8.0
wsgiref==0.1.2
wxPython==2.8.12.1
wxPython-common==2.8.12.1
Hello, thanks for great module... i follow all the instructions, but i have this issue:
2015-01-10 18:12:35,555 - proxypos.proxypos.app - ERROR - Failed to print receipt
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/app.py", line 90, in do_print
device.print_receipt(receipt)
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/controlers/printer.py", line 73, in print_receipt
self._printImgFromFile(filename)
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/controlers/printer.py", line 225, in _printImgFromFile
img = Image.open(filename).convert("1")
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1955, in open
fp = builtin.open(fp, "rb")
IOError: [Errno 2] No such file or directory: '/home/pos/.proxypos/templates/logo.jpg'
Hello,
Does this official Odoo app replace your module ?
Pasting here for reference!!
hi,
i'm having trouble for printing the third line and next lines (it's working normal for the first and second line), it's always getting error on simplejson parse error " TypeError: Expected string or buffer".
I'm wondering if you already knew about this issue, btw i'm using Ubuntu 13.04, Python 2.7.4, and my OpenErp server version is 7.0-20131031-002505
hi, is this project still active?
is this same from the posbox project or different?
can you print in different languages, like chinese, arabic, etc.?
I cannot print to my USB receipt printer. The info.error log shows the following:
2014-06-25 10:02:45,841 - proxypos.proxypos - INFO - ProxyPos server starting up...
2014-06-25 10:02:45,842 - proxypos.proxypos - INFO - Listening on http://localhost:8069/
2014-06-25 10:08:54,983 - proxypos.proxypos.app - INFO - open_cashbox
2014-06-25 10:08:55,208 - proxypos.proxypos.app - ERROR - Failed to open the cashbox
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/app.py", line 259, in open_cashbox
device = printer.device()
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/controlers/printer.py", line 48, in init
settings['idProduct'])
File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 36, in init
self.open()
File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 64, in open
cfg = self.device.get_active_configuration()
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 785, in get_active_configuration
return self._ctx.get_active_configuration(self)
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 210, in get_active_configuration
bConfigurationValue=self.backend.get_configuration(self.handle)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 460, in get_configuration
100)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 528, in ctrl_transfer
timeout
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 380, in _check
raise USBError(errmsg, ret)
USBError: [Errno None] error sending control message: Operation not permitted
2014-06-25 10:09:32,363 - proxypos.proxypos.app - INFO - Procesing /pos/print_receipt POST method
2014-06-25 10:09:32,365 - proxypos.proxypos.app - INFO - Printing receipt {'shop': {'name': 'Profile - PWW101 - Virtual at CNA'}, 'total_tax': 0, 'name': 'Order 1403708738650', 'total_with_tax': 49.47, 'company': {'website': False, 'name': 'Profile Enterprise', 'phone': False, 'contact_address': '\n\n \n', 'email': '[email protected]', 'vat': False, 'company_registry': False}, 'orderlines': [{'unit_name': 'Unit(s)', 'product_description_sale': False, 'price_display': 17.490000000000002, 'price': 17.490000000000002, 'tax': 0, 'product_description': False, 'price_with_tax': 17.490000000000002, 'price_without_tax': 17.490000000000002, 'discount': 0, 'product_name': '15g MR Variety Pack', 'quantity': 1}, {'unit_name': 'Unit(s)', 'product_description_sale': False, 'price_display': 31.98, 'price': 15.99, 'tax': 0, 'product_description': False, 'price_with_tax': 31.98, 'price_without_tax': 31.98, 'discount': 0, 'product_name': 'Creamy Tomato Soup-15g', 'quantity': 2}], 'cashier': 'PWW101-Reg1', 'total_without_tax': 49.47, 'currency': {'rounding': 0.01, 'position': 'before', 'symbol': '$', 'id': 3, 'accuracy': 4}, 'client': {'membership_status': False, 'name': 'Walk in Customer', 'mobile': False, 'customer_type': False, 'walkin_customer': True, 'id': 61699, 'vat': False}, 'total_discount': 0, 'invoice_id': None, 'date': {'hour': 10, 'month': 5, 'year': 2014, 'date': 25, 'day': 3, 'minute': 9}, 'total_paid': 49.47, 'paymentlines': [{'amount': 49.47, 'journal': 'Check (USD)'}], 'subtotal': 49.47, 'change': 0}
2014-06-25 10:09:32,367 - proxypos.proxypos.app - ERROR - Failed to print receipt
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/app.py", line 89, in do_print
device = printer.device()
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/controlers/printer.py", line 48, in init
settings['idProduct'])
File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 36, in init
self.open()
File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 58, in open
self.device.set_configuration()
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 779, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 126, in managed_set_configuration
self.managed_open()
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 104, in managed_open
self.handle = self.backend.open_device(self.dev)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 718, in open_device
return _DeviceHandle(dev)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 596, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 548, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 537, in _strerror
return _lib.libusb_strerror(errcode).decode('utf8')
File "/usr/lib/python2.7/ctypes/init.py", line 378, in getattr
func = self.getitem(name)
File "/usr/lib/python2.7/ctypes/init.py", line 383, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/i386-linux-gnu/libusb-1.0.so.0: undefined symbol: libusb_strerror
2014-06-25 10:09:32,395 - proxypos.proxypos.app - INFO - Procesing /pos/print_receipt GET method
2014-06-25 10:09:32,396 - proxypos.proxypos.app - INFO - Already printed receipt by POST method
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/proxypos-1.2.0-py2.7.egg/proxypos/proxypos/app.py", line 276, in print_receipt
logger.debug('Params %s', str(params['r']))
KeyError: 'r'
Good day, do you have an .exe installer for windows 7.
proxypos odoo 8 compatibility
I have tried the update branch. Here is what I got:
The printer still prints at 44 charWidth. My paper size is 80x297mm which is roughly 55 charWidth. I tried changing the values but it is still the same.
Is there limitation to what the template can pull from OpenERP? I cant pull the company tagline which is "rml_header1" to be printed out.
"Change" value remains at 0.
Logo seems even worse after the new update.
I can provide a screenshot of my result if needed. Let me know.
I installed Proxypos on my client till. Started proxypos-server.
proxypos.proxypos - INFO - Listening on http://0.0.0.0:8069/
If I go to localhost:8069 on my client till should it tell me connected devices. At the moment I am getting
Error: 404 Not Found
Sorry, the requested URL 'http://localhost:8069/' caused an error:
Not found: '/
Should I be seeing something on this address? I know this is not my Odoo instanace but should I see connected devices etc..
I tried using this image from google:
http://jpgraph.net/download/manuals/chunkhtml/images/qr-code-small.png
Cant print out the logo properly.
It produces one line of image as per below:
I followed the documentation but as I restarted my server, OpenERP failed to start as it clashes with the ProxyPOS port. For some reason, they share the same port? I tried changing OpenERP port number to 8068 and OpenERP can start as expected but the print result is still unclear.
I am using Linux Mint 13 Maya with OpenERP v7. The printer I am using is Partner RP320.
Like to check. What if my POS is running on Windows XP instead of Linux Mint, how can I make this work? Any help? Thanks.
I cannot print to my serial port printer i got:
SerialException: Could not configure port: (22, 'Invalid argument')
when trying to send something to the printer.
Hello,
I'm trying to print from POS80mm based on EPSON (ESC/POS) Thermal printer standard, browser is running on Lubuntu, OpenERP installed at AWS EC2 Cloud server, but couldn't done succesfully not even from Windows browser: different browsers different bad presentation, will the Mint steps work the same on Lubuntu 14.04?
If its not the same, is there an easier way to print simply buying another printer ready for OpenERP7, which one?
Thanks!
When I try to start proxypos-server I always get this error at the end.
socket.error: [Errno 98] Address already in use.
When I kill the process that is blocking proxypos-server to start, It starts, but when trying to access by web browser it gives an error 404.
Not found: '/'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.