Commit Graph
48 Commits
Author SHA1 Message Date
Antoine Prieels 6cf30cb869 [IMP] hw_*: Remove "Shell=True" in subrpocess calls
In the IoT Box, most calls to subprocess used "Shell=True", which can
cause security issues.

TaskID: 1966417
2019-09-04 13:10:03 +00:00
Antoine Prieels 4e649a8ca9 [REF] hw_{driver, scanner}: Barcode scanners as IoT Devices
Barcode scanners are now part of KeyboardUSBDriver. We also add
the possibility to change the keyboard/scanner layout from an
action. The list of available layout can be retrieved with a new
route.

`hw_scanner` has been removed. Backward compatibility is ensured
because the name of the route that is now used in community is the
same that was used previously.

TaskID: 1939455
2019-08-13 15:35:38 +02:00
Romain Derie d7cd97a9be [IMP] *: new asset for test files, new debug mode (stored in session)
This commit goal is to encapsulate every tour-test into a separate assets
bundle that would be called only during tests (command line) or by URL
(debug=tests). That way, a lot of .js files would not be loaded anymore
uselessly outside test mode and will speed up the page loads (especially in the
frontend as the backend do not reload the page anyway).

In order to do that, we needed to propagate the `debug` state from page to
page.
Otherwise, every page change during a test would simply lose the debug mode and
the test would stop as the test assets would not be loaded.
As we could not add the `&debug=tests` on every link (either hardcoded or
preprocess during the rendering), it has been decided to store it in session.

Technical summary:
1. `debug` state (currently only stored in URL) will be stored in session.
   Either when adding the `debug` param in URL (handled with _dispatch) or by
   starting Odoo with `test-enable` or `test-file` (handled by session init).
2. Once activated (and so set in session), debug mode will remain activated
   even if not visible in URL (after a page navigation eg).
   To deactivate it, set its value to nothing, `debug=`. That will exit debug mode
   (whatever mode it is: debug, assets, tests).
3. As tour-test files are now in a separate bundle, every layout (when needed)
   should `t-call="web.conditional_assets_tests"`.
   As it would be redundant and verbose, no `t-if` is needed on the t-call to
   load it only in test debug mode. That will be handled by
   `compiled_assets_tests` that will actually do the conditionnal t-call-assets
   to web.assets_tests, if tests debug mode is activated.
4. In addition to separating the tour-tests files in a separate bundle, we also
   moved those files to a specific folder under /static/tests/tours next to
   QUnit tests.
5. Also, tour files will be moved in a specific folder /static/src/js/tours for
   cleanness purpose (those files will still be kept in their 'normal' assets
   as needed outside test mode since it is tours).
   This will be done in the next commit.
6. It is possible to enable multiple debug mode, such as 'tests' and 'assets'
   together. Simply separate debug modes with a comma, eg '?debug=assets,tests'

task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213
2019-06-05 05:56:33 +00:00
Josse Colpaert 8b957b7e85 [IMP] hw_*: updated web interface for IoT Box
We changed the naming of posbox to IoT Box everywhere
and renewed the web interface using jinja2 templates in
separate html files.

A separate configuration for the server and the IoT Box name
was added and it shows drivers for both  pos and iot.

The interface also needs a step to step wizard that is launched
when the access point is active for simplified configuration.

Thanks to qle and Deep Patel.
2018-09-25 23:01:40 +02:00
Josse Colpaert 7d34f0218b [IMP] point_of_sale: posbox upgrade to stretch / python3
- transform odoo.py -> odoo-bin / recent branches + pip3 packages
- deactivate wpa_supplicant when starting dhcpcd automatically
- postgresql create clusters manually
- latest stretch raspbian image / add versatile-db.ptb for kernel-qemu
- ifconfig output change
- upgrade hw_-modules:
    hw_escpos: to python3
    hw_posbox_homepage: to v11: csrf does not work as it needs a database
    hw_posbox_upgrade: to python3 decode utf-8
    hw_scale: to python3
    hw_proxy: to python3

With the commit, the posbox will also work on the new Raspberry Pi 3b+
2018-07-13 15:10:12 +02:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Christophe Simonis 5ea0f55d65 [MERGE] forward port branch saas-15 up to bee0c11ef7 2017-10-20 17:57:21 +02:00
Christophe Simonis 4af5e03d80 [ADD] hw_proxy: do not mix indentation with tab & spaces 2017-10-19 22:25:31 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Christophe Simonis 59f8b849fb [MERGE] forward port branch saas-15 up to d5f2a38b50 2017-08-23 11:23:08 +02:00
Edi Santoso 8102698dfd [FIX] hw_proxy: error when check status in debug mode
when access status hw_proxy in debug mode it's will raise error,
it's happens because hw_proxy uses subprocess module to get a list of usb
but the subprocess module not imported.

Introduced at 56456359

Closes #18820
2017-08-14 10:47:50 +02:00
Xavier Morel 3833c8997d [FIX] P3: removed commands module 2017-05-15 12:26:16 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
xmo-odoo 6b9268bd15 [FIX] print statement -> function
In Python 3, ``print`` becomes a builtin function. This is available
in Python 2 by importing the ``print_function`` feature from
``__future__``, the feature is conveniently still available in Python
3 (it just does nothing).

Fixers:
    libfuturize.fixes.fix_print_with_import

#8530
2017-04-25 13:27:54 +02:00
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Christophe Simonis 7ee09ed0c1 [MERGE] forward port branch saas-6 up to 6d8d7a5 2016-11-17 13:11:04 +01:00
Christophe Simonis 6d8d7a5970 [MERGE] forward port branch 8.0 up to 8e8b792 2016-11-17 12:41:45 +01:00
Olivier Dony 265c9f7b06 [IMP] hw_proxy: add lsusb full output to hw status page 2016-11-14 17:11:57 +01:00
Olivier Dony eeadeb0d6e [FIX] hw_proxy,hw_blackbox_be: make RS-232 drivers protect their device
RS-232 drivers now need to register any device
they are handling in the hw_proxy.rs232_devices map.
This will prevent other drivers from probing them,
possibly messing up with the device.
Any update to rs232_devices must be done while holding
the hw_proxy.rs232_lock.

The hw_scale driver will be updated to use this mechanism
in the next commit, that will also handle a new RS-232
scale protocol.
2016-11-14 17:11:57 +01:00
Rohan Patel 5645635949 [MIG] hw_proxy : Migrated to new API. 2016-08-04 12:37:08 +02:00
Leonardo Rochael Almeida 60af7cac02 [IMP] replace simplejson with stdlib json
The stdlib version of the json library is more recent than the 3.5.3
version we are pinning in `requirements.txt`

There is no reason to use it.

Closes #6940
2015-09-28 10:53:32 +02:00
Denis Ledoux a3648fd23a [MERGE] forward port of branch 8.0 up to aabbdc7 2015-09-21 16:01:58 +02:00
Joren Van Onder 9365ecaada [FIX] hw_proxy: remove forms related to supported devices
The concept of supported devices was removed in
e7c51228f3. These forms should have been
removed with them.
2015-09-16 15:05:04 +02:00
Christophe Simonis 171d001985 [MERGE] forward port of branch 8.0 up to 02954ba 2015-08-11 16:56:47 +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
Christophe Simonis 0da722aa6a [MERGE] forward port of branch 8.0 up to bff6dff 2015-05-11 15:12:24 +02:00
Olivier Dony 5275c10e70 [FIX] hw_proxy: routes shadowed by same method name 2015-05-08 12:39:32 +02:00
Christophe Simonis 18e22be138 [MERGE] forward port of branch 8.0 up to 0aab81c 2015-01-19 17:15:56 +01:00
Erwin van der Ploeg 5843a12f26 [Fix] Some missed frontend openerp to odoo changes 2015-01-12 16:17:12 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Frederic van der Essen 9068acd7a6 [IMP] posbox: rename OpenERP to Odoo 2014-07-15 16:17: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
Frédéric van der Essen f3da22c067 [IMP] point_of_sale, hw_scale: first commit for the hw_scale module, which handles scale connections for the POS
bzr revid: fva@openerp.com-20140424171259-hi9ma6w0fkdfrqnv
2014-04-24 19:12:59 +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
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
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
Fabien Meghazi 9ce7c7d561 [IMP] Use CORS in pos (only two routes)
bzr revid: fme@openerp.com-20140130122752-kfgo7u0q0crn3tbr
2014-01-30 13:27:52 +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
Frédéric van der Essen 1e09d3b3f5 [IMP] point_of_sale: Realtime printer & scanner online status
bzr revid: fva@openerp.com-20140126215528-q32v2q8keh6m0ufo
2014-01-26 22:55:28 +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 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 a97a587fad [IMP] point_of_sale: posbox automatic discovery
bzr revid: fva@openerp.com-20140110171746-286285ds696d5kby
2014-01-10 18:17:46 +01:00
Frédéric van der Essen 434513e761 [hw_scanner] implementation of the client side component of the barcode scanner proxy
bzr revid: fva@openerp.com-20140103130930-q1shnj9172yzn0gr
2014-01-03 14:09:30 +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 293001c826 [IMP] point_of_sale: ESC/POS receipt printing
bzr revid: fva@openerp.com-20131220163057-9nu1u7hti0m8wo3h
2013-12-20 17:30:57 +01:00
Frédéric van der Essen 2fec901cb5 [FIX] point_of_sale & hw_proxy: connect the pos to the new proxy, and fix scale emulation
bzr revid: fva@openerp.com-20131219142911-i9mkwqt1e0wz28i7
2013-12-19 15:29:11 +01:00
Frédéric van der Essen 1a7eed01a7 [IMP] hw_proxy: initial commit of the hardware proxy module, used by the point of sale to connect to usb devices
bzr revid: fva@openerp.com-20131219131140-sm6fvpjtje6ova0p
2013-12-19 14:11:40 +01:00