Commit Graph

53 Commits

Author SHA1 Message Date
Martin Trigaux 8459860b02
[IMP] hw_escpos: more fault tolerant printer detection
In some cases, the description fails (unknow printer, udev issues,...) and while
the printer works fine, the description fails.

This is a cherry pick of 994d45f4 to 8.0 (as the posbox is built on top of it)
2017-03-16 13:37:20 +01:00
Olivier Dony 8e8b7925d2
[FIX] hw_escpos: auto-detect endpoint address
Instead of hardcoding the IN & OUT endpoint
addresses for the ESC/POS printers, we now
attempt to auto-detect them.

This should increase compatibility with many
compatible thermal printers that are simply
using a different address, such as the
- STMicroelectronics POS58 Printer USB
- HU HAI SUNCSW Receipt Printer Co.,Ltd. Gprinter USB Printer

Fixes #12890
2016-11-16 14:52:34 +01:00
Joren Van Onder 6f4e7867f0 [IMP] hw_escpos: add the MAC address to the ticket printed at startup
Usually when setting up a POSBox you want it to have a static IP. The
best way to do that is by configuring whatever DHCP server is
used (usually just on the router) to always assign the same IP to a
certain MAC address (naming depends on what is being used, sometimes
it's called static DHCP but it's also known as DHCP reservations and a
bunch of other names).

The process of setting this up is complicated for a non-technical user,
and this attempts to make it a little bit easier to do by immediately
giving them the correct MAC address they should use. To avoid confusion
this only prints the MAC addresses for interfaces which have an IP
address.
2016-01-29 09:25:15 +01:00
Joren Van Onder 546a1d4a32 [IMP] point_of_sale: support Wi-Fi on the posbox
This allows people to connect the posbox to networks using a wireless
network adapter.

When plugging in a USB Wi-Fi adapter and no network cable, the posbox
will boot and host its own Access Point called "Posbox". Users can
connect their device to this network and can then connect to the posbox
the usual way.

An interface for has been provided that also allows users to instruct
the posbox to connect to a different Wi-Fi network. This is useful when
the client is not running Odoo locally.

It is also possible to make this configuration persistent. With a
persistent Wi-Fi network configuration, the posbox will always try to
connect to the specified network after a reboot.

Attempts have been made to make the Wi-Fi connection as robust as
possible. Upon connection loss, the posbox will automatically attempt to
reconnect.
2015-10-09 09:38:09 +02:00
Joren Van Onder f008240411 [FIX] hw_escpos: certain Epson printers do not identify as a printer
We search for USB devices that identify as a printer through their
DeviceClass or one of their InterfaceClasses. The issue is a lot of
printers use vendor-specific Device/InterfaceClasses.

Apparently the Epson TM-T88IV is one of those devices. So in order to
work around this, we now first look for a USB device that identifies as
a printer. If those do not exist, we pick the first Epson device, if
those do not exist we pick the first Star device.

Perhaps we should instead start using some kind of probe-based approach
to identify ESC/POS compatible devices.
2015-10-07 13:03:46 +02:00
Joren Van Onder a11a490d30 [IMP] hw_escpos: support Star TSP650II
In order for the printer to work we need to configure it in USB vendor
mode. This means it will not have a USB interfaceClass of 7. So when
we don't find any USB device that identifies as a printer, we search
for Star devices and use the first one of those we find.

This should be reasonably safe because Star does not manufacture other
devices apart from printers that one would attach to the posbox.
2015-09-17 09:26:33 +02:00
Joren Van Onder e7c51228f3 [IMP] hw_escpos: get rid of printer whitelist
It makes more sense to just look for usb devices that identify as a
printer and use whatever we get. This saves us time having to explain to
users how to add their particular printer to the whitelist to test.
2015-08-26 15:12:39 +02:00
Joren Van Onder 86762ef30f [IMP] point_of_sale: add scripts to generate posbox images
Instead of continuing to build upon the old images, these scripts
implement a reproducable way to generate new posbox images. The
generated images will be based on the latest stable Raspbian
release. The image will be created with the help of qemu-system-arm,
which will boot up the image and execute a script that will set up the
posbox image.

This way everything necessary to set up a posbox is readable in the
scripts and accompanying files, instead of being hidden in an image.
2015-08-11 15:19:57 +02:00
Joren Van Onder 59b5f136bf [IMP] point_of_sale: add patches from `posbox` branch
This commit contains the patches from the now obsolete 'posbox'
branch. These patches were written by Martin Donies (@mdo-odoo) and
Frédéric Van der Essen (@fvdsn).
2015-08-11 15:13:17 +02:00
Martin 3cf45e1111 [FIX] hw_escpos: Backport driver robustness 2015-02-10 13:24:59 +01:00
Josse Colpaert 8b84615de1 [MERGE] Merge from trunk test
bzr revid: jco@openerp.com-20140502130352-c3h1fk332eqyd78b
2014-05-02 15:03:52 +02:00
Fabien Meghazi 877503143d [REM] html_template from hw_*
bzr revid: fme@openerp.com-20140430132510-smhi39h9oyi8p4nt
2014-04-30 15:25:10 +02:00
Quentin (OpenERP) 398d96f273 [MERGE] merged trunk up to revision 9327
bzr revid: qdp-launchpad@openerp.com-20140414094743-hv0u7qhigv1to2uc
2014-04-14 11:47:43 +02:00
Frédéric van der Essen d704fb0060 [IMP] hw_proxy, hw_escpos: it is now possible to add support for new printers from the posbox hardware status page + fix backward compatiblity for hardcoded receipts
bzr revid: fva@openerp.com-20140411120510-t3a8b3axq1q4wuje
2014-04-11 14:05:10 +02:00
Christophe Simonis 0fad8159f3 [MERGE] forward port of branch saas-3 up to revid 9380 chs@openerp.com-20140407144439-10n8fs6zovodwwtx
bzr revid: chs@openerp.com-20140407163318-hh3jwfkj3o2c83lk
2014-04-07 18:33:18 +02:00
Quentin (OpenERP) ff4726ea7d [MERGE] merged trunk up to revision 9281
bzr revid: qdp-launchpad@openerp.com-20140403081427-7xpn57wdfv08v2al
2014-04-03 10:14:27 +02:00
Christophe Simonis 37c469c5cd [FIX] hw_{scanner,escpos}: ensure we always release the lock.
[FIX] hw_scanner: mark the thread as deamon.

bzr revid: chs@openerp.com-20140329144146-utr8gexna4un65u1
2014-03-29 15:41:46 +01:00
Quentin (OpenERP) 9989113946 [MERGE] merge branch that fixes point of sale accordingly to changes made in stock
bzr revid: qdp-launchpad@openerp.com-20140328145710-ibzo59dv1p06jbg3
2014-03-28 15:57:10 +01:00
Frédéric van der Essen 4745099706 [FIX] hw_escops, point_of_sale: backporting fixes from the pos-restaurant branch
bzr revid: fva@openerp.com-20140328134401-ao85rr8b29nqg626
2014-03-28 14:44:01 +01:00
Frédéric van der Essen 9e801815bf [IMP] hw_escpos, hw_proxy: improved status page appeareance, add a listing of connected devices to hardware status page
bzr revid: fva@openerp.com-20140326103230-ib1myl1rmipoynkn
2014-03-26 11:32:30 +01:00
Josse Colpaert d4eda78813 [IMP] Put company_id on pos config + remove pos config name
bzr revid: jco@openerp.com-20140324120747-v3mt7pwgqylekshg
2014-03-24 13:07:47 +01:00
Frédéric van der Essen 6aa0187ca3 [IMP] posbox: print the homepage url on the status ticket
bzr revid: fva@openerp.com-20140321163740-0o0b3ikmz6jv6cwr
2014-03-21 17:37:40 +01:00
Frédéric van der Essen 53f02309ed [IMP] hw_escpos: print_xml_receipt() controller allows you to print an xml defined receipt
bzr revid: fva@openerp.com-20140320112720-ldshe2764z3fyfvi
2014-03-20 12:27:20 +01:00
Frédéric van der Essen d5a730a0b3 [WIP] hw_escpos: printing client-side defined xml templates
bzr revid: fva@openerp.com-20140317132906-uyr7h1oce8pptny9
2014-03-17 14:29:06 +01:00
Christophe Simonis 4b72678bc7 [MERGE] forward port of branch saas-2 up to revid 9195 chs@openerp.com-20140220154517-6y531n1mqtnfnsmr
bzr revid: chs@openerp.com-20140220163815-69sza1kclnh5mavs
2014-02-20 17:38:15 +01:00
Olivier Dony 7079fc3afd [FIX] hw_escpos: do not start queue processor if ESC/POS not available
bzr revid: odo@openerp.com-20140218110824-pdy54bdmm0appntu
2014-02-18 12:08:24 +01:00
Frédéric van der Essen 22e09cb41e [FIX] hw_escpos: status receipt would not print on the posbox
bzr revid: fva@openerp.com-20140210161701-aolbu63i7w74f97c
2014-02-10 17:17:01 +01:00
Frédéric van der Essen d930115bd3 [IMP] hw_escpos: print a status receipt on printer connection with ip address for easier configuration & debugging. Also setting the driver thread in daemon mode to avoid hanging the tests on the runbot
bzr revid: fva@openerp.com-20140210133109-xll1ijjdhbgpj1kr
2014-02-10 14:31:09 +01:00
Frédéric van der Essen a78af30755 [FIX] hw_escpos: company logo was not centered on the first receipt
bzr revid: fva@openerp.com-20140206151432-avaz87emjzqyvu9t
2014-02-06 16:14:32 +01:00
Frédéric van der Essen a9226e3d5b [FIX] hw_scanner, hw_escpos: prevent driver threads from deadlocking when woken by two simultaneous requests
bzr revid: fva@openerp.com-20140206140524-ur51ghcpdzwxv1yr
2014-02-06 15:05:24 +01:00
Christophe Simonis 1e4d99eede [MERGE] backport trunk revisions
* 9094 fva@openerp.com-20140203144847-21cv7pt7lnlxdsve
 * 9095 fva@openerp.com-20140203153233-zj12w2o1uxyz5hoq

bzr revid: chs@openerp.com-20140206132039-y1whtc8qqqs8ey92
2014-02-06 14:20:39 +01:00
Antony Lesuisse 4b30f1fcbd [MERGE] trunk-website-al
bzr revid: al@openerp.com-20140131005157-jkf8hz6fh2buml2c
2014-01-31 01:51:57 +01:00
Frédéric van der Essen ba2d4c9030 [IMP] point_of_sale, hw_escpos: hopefully much faster printing on the posbox by caching logo conversion
bzr revid: fva@openerp.com-20140130182109-11njt0khmylp0r7p
2014-01-30 19:21:09 +01:00
Fabien Meghazi dac3796177 [MERGE] upstream
bzr revid: fme@openerp.com-20140130125458-rnhvcsgpafcaqftt
2014-01-30 13:54:58 +01:00
Fabien Meghazi d5031cbee8 [ADD] POS: added cors argument to all routes
bzr revid: fme@openerp.com-20140130124606-wetmhcjqqvvkv5dy
2014-01-30 13:46:06 +01:00
Christophe Simonis c202dc1c52 merge upstream
bzr revid: chs@openerp.com-20140129190834-xfcat3ulfbg5omhn
2014-01-29 20:08:34 +01:00
Frédéric van der Essen d88b10fd07 [IMP] hw_escpos: moved list of supported printers to a separate file
bzr revid: fva@openerp.com-20140129163259-xdarcaw4qcqprvt6
2014-01-29 17:32:59 +01:00
Fabien Meghazi f31ddba8b3 [MERGE] upstream
bzr revid: fme@openerp.com-20140129153718-b86vsyogxkr8lk19
2014-01-29 16:37:18 +01:00
Fabien Meghazi 9860ddd352 [REM] POS: Replaced auth="admin" by auth="none"
bzr revid: fme@openerp.com-20140129153408-d8zkyty1rcvvzqx3
2014-01-29 16:34:08 +01:00
Christophe Simonis 151d37900e [FIX] hw_escpos: do not forbid import of controller if python dependencies are missing
bzr revid: chs@openerp.com-20140128113309-ypfcng638a0mgcjp
2014-01-28 12:33:09 +01:00
Frédéric van der Essen e2f2381fc2 [FIX] point_of_sale: fixing pos incompatibilities with the model changes in trunk-website-al
bzr revid: fva@openerp.com-20140127161005-2tntipu1x50kuhpz
2014-01-27 17:10:05 +01:00
Frédéric van der Essen 7e535526cb [FIX] hw_proxy: fix harmless exception on proxy restart
bzr revid: fva@openerp.com-20140126194055-pietbyi7ezvdm9ch
2014-01-26 20:40:55 +01:00
Frédéric van der Essen f1fa4fa230 [IMP] hw_proxy: better driver status reporting with hw_proxy/status, improved printing reliability
bzr revid: fva@openerp.com-20140126183500-ejbm9d4jafl817tq
2014-01-26 19:35:00 +01:00
Frédéric van der Essen ee3fa52bbe [IMP] hw_escpos: codepage switch sequence for all encodings supported by the TM-T20 printer
bzr revid: fva@openerp.com-20140124173119-naktj3usjuapb9sf
2014-01-24 18:31:19 +01:00
Frédéric van der Essen fa22b31967 [FIX] hw_escpos: syntax error
bzr revid: fva@openerp.com-20140116101755-7rxbn895yyq7sdub
2014-01-16 11:17:55 +01:00
Frédéric van der Essen 6d6708f6ac [IMP] hw_escpos: do not crash on module loading if there are missing python dependencies
bzr revid: fva@openerp.com-20140114103117-1930rki63u7alm26
2014-01-14 11:31:17 +01:00
Frédéric van der Essen bee7a6d4f3 [FIX] point_of_sale: removed useless escpos python module & pyusb from hw_proxy module
bzr revid: fva@openerp.com-20140113092322-qa8v4qhr4qo2kouc
2014-01-13 10:23:22 +01:00
Frédéric van der Essen 4b4642bcc9 [IMP] hw_escpos: print taxes details on receipt
bzr revid: fva@openerp.com-20140106145446-fhcefc6zy8w7zsur
2014-01-06 15:54:46 +01:00
Frédéric van der Essen 0fd4888e84 [hw_scanner] implementation of the server side component of the barcode scanner proxy
bzr revid: fva@openerp.com-20140102141519-jaqi8mcqff282c6n
2014-01-02 15:15:19 +01:00
Frédéric van der Essen 4d7121cd24 [IMP] hw_escpos: setting up translation strings
bzr revid: fva@openerp.com-20131226170830-n67c6upq28zwya41
2013-12-26 18:08:30 +01:00