odoo-driver 2.2.2__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/PKG-INFO +1 -1
  2. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/__init__.py +15 -5
  3. odoo_driver-2.4.0/odoo_driver/i18n/fr/LC_MESSAGES/messages.mo +0 -0
  4. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/i18n/fr/LC_MESSAGES/messages.po +10 -6
  5. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/i18n/messages.pot +10 -6
  6. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/routes/routes_website.py +42 -18
  7. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/layout.html.jinja +3 -0
  8. odoo_driver-2.4.0/odoo_driver/templates/supported_devices.html.jinja +45 -0
  9. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/tools/tools_plugins.py +2 -2
  10. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/pyproject.toml +1 -1
  11. odoo_driver-2.2.2/odoo_driver/i18n/fr/LC_MESSAGES/messages.mo +0 -0
  12. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/README.md +0 -0
  13. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/app.py +0 -0
  14. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/cli.py +0 -0
  15. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/default_cert/server.crt +0 -0
  16. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/default_cert/server.key +0 -0
  17. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/drivers/__init__.py +0 -0
  18. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/drivers/driver_abstract.py +0 -0
  19. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/drivers/driver_abstract_with_queue.py +0 -0
  20. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/drivers/driver_task.py +0 -0
  21. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/i18n/babel.cfg +0 -0
  22. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/routes/__init__.py +0 -0
  23. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/routes/routes_odoo.py +0 -0
  24. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/css/bootstrap.min.css +0 -0
  25. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/css/odoo_driver.css +0 -0
  26. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/img/favicon.png +0 -0
  27. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/img/odoo.png +0 -0
  28. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/img/unknown_device.png +0 -0
  29. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/js/bootstrap.bundle.min.js +0 -0
  30. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/static/js/jquery.min.js +0 -0
  31. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/application.html.jinja +0 -0
  32. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/driver_disconnections.html.jinja +0 -0
  33. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/driver_errored_tasks.html.jinja +0 -0
  34. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/drivers.html.jinja +0 -0
  35. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/system.html.jinja +0 -0
  36. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/templates/usb_core_devices.html.jinja +0 -0
  37. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/tools/__init__.py +0 -0
  38. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/tools/tools_interface.py +0 -0
  39. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/tools/tools_serial_code.py +0 -0
  40. {odoo_driver-2.2.2 → odoo_driver-2.4.0}/odoo_driver/tools/tools_usb_device.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: odoo-driver
3
- Version: 2.2.2
3
+ Version: 2.4.0
4
4
  Summary: Python library to communicates with devices used by Odoo.(Mainly Point of Sale application)Alternative to Iot Box Odoo solution or Pywebdriver community solution.
5
5
  License: AGPLv3+
6
6
  Keywords: Odoo,Point Of Sale,Driver,Device
@@ -10,22 +10,32 @@ __version__ = get_version(__name__, Path(__file__).parent.parent)
10
10
  __package_name__ = __name__
11
11
 
12
12
  _HASH_EXTENSIONS = [".py"]
13
+ _IGNORED_FILES = [
14
+ # Prevent to change hash, if contributors
15
+ # a new supported device
16
+ "usb_devices.py",
17
+ # routes_website contains only routes for testing purpose
18
+ # for the web interface. only 'routes_odoo' should be hashed.
19
+ "routes_website.py",
20
+ ]
13
21
 
14
22
 
15
- def md5_update_from_dir(directory, hash):
23
+ def md5_update_from_dir(directory, hash_value):
16
24
  assert Path(directory).is_dir()
17
25
  for path in sorted(Path(directory).iterdir(), key=lambda p: str(p).lower()):
18
- hash.update(path.name.encode())
26
+ hash_value.update(path.name.encode())
19
27
  if path.is_file():
20
28
  if path.suffix not in _HASH_EXTENSIONS:
21
29
  continue
30
+ if path.name in _IGNORED_FILES:
31
+ continue
22
32
  logger.debug(f"Hashing file {path.absolute()}...")
23
33
  with open(path, "rb") as f:
24
34
  for chunk in iter(lambda: f.read(4096), b""):
25
- hash.update(chunk)
35
+ hash_value.update(chunk)
26
36
  elif path.is_dir():
27
- hash = md5_update_from_dir(path, hash)
28
- return hash
37
+ hash_value = md5_update_from_dir(path, hash_value)
38
+ return hash_value
29
39
 
30
40
 
31
41
  logger.info("Computing hash for 'odoo_driver'...")
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
- "POT-Creation-Date: 2026-05-06 14:45+0200\n"
10
+ "POT-Creation-Date: 2026-05-06 23:54+0200\n"
11
11
  "PO-Revision-Date: 2024-08-14 22:35+0200\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language: fr\n"
@@ -22,10 +22,6 @@ msgstr ""
22
22
  msgid "Unknown"
23
23
  msgstr "Inconnu"
24
24
 
25
- #: routes/routes_website.py:69
26
- msgid "Start datetime"
27
- msgstr "Date de démarrage de l'application"
28
-
29
25
  #: routes/routes_website.py:89
30
26
  msgid "Operating System"
31
27
  msgstr "Système d'exploitation"
@@ -70,6 +66,10 @@ msgstr "Charge de la mémoire"
70
66
  msgid "Python Version"
71
67
  msgstr "Version de Python"
72
68
 
69
+ #: routes/routes_website.py:124
70
+ msgid "Start datetime"
71
+ msgstr "Date de démarrage de l'application"
72
+
73
73
  #: templates/application.html.jinja:10 templates/system.html.jinja:10
74
74
  msgid "Name"
75
75
  msgstr "Nom"
@@ -164,10 +164,14 @@ msgid "USB Devices"
164
164
  msgstr "Périphériques USB"
165
165
 
166
166
  #: templates/layout.html.jinja:41
167
+ msgid "Supported Devices"
168
+ msgstr "Périphériques supportés"
169
+
170
+ #: templates/layout.html.jinja:44
167
171
  msgid "System"
168
172
  msgstr "Système"
169
173
 
170
- #: templates/layout.html.jinja:44
174
+ #: templates/layout.html.jinja:47
171
175
  msgid "Application"
172
176
  msgstr "Application"
173
177
 
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: PROJECT VERSION\n"
10
10
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11
- "POT-Creation-Date: 2026-05-06 14:45+0200\n"
11
+ "POT-Creation-Date: 2026-05-06 23:54+0200\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,10 +21,6 @@ msgstr ""
21
21
  msgid "Unknown"
22
22
  msgstr ""
23
23
 
24
- #: routes/routes_website.py:69
25
- msgid "Start datetime"
26
- msgstr ""
27
-
28
24
  #: routes/routes_website.py:89
29
25
  msgid "Operating System"
30
26
  msgstr ""
@@ -69,6 +65,10 @@ msgstr ""
69
65
  msgid "Python Version"
70
66
  msgstr ""
71
67
 
68
+ #: routes/routes_website.py:124
69
+ msgid "Start datetime"
70
+ msgstr ""
71
+
72
72
  #: templates/application.html.jinja:10 templates/system.html.jinja:10
73
73
  msgid "Name"
74
74
  msgstr ""
@@ -163,10 +163,14 @@ msgid "USB Devices"
163
163
  msgstr ""
164
164
 
165
165
  #: templates/layout.html.jinja:41
166
- msgid "System"
166
+ msgid "Supported Devices"
167
167
  msgstr ""
168
168
 
169
169
  #: templates/layout.html.jinja:44
170
+ msgid "System"
171
+ msgstr ""
172
+
173
+ #: templates/layout.html.jinja:47
170
174
  msgid "Application"
171
175
  msgstr ""
172
176
 
@@ -58,27 +58,27 @@ def usb_core_devices_refresh():
58
58
  return redirect(url_for("usb_core_devices"))
59
59
 
60
60
 
61
- @app.route("/application.html")
61
+ @app.route("/supported_devices.html", methods=["GET"])
62
62
  @logger.catch
63
- def application():
64
- # Lazy import, to avoid circular import problem
65
- from .. import __package_name__, __version__, code_hash
66
- from ..tools.tools_plugins import installed_plugins
67
-
68
- application_info = [
69
- (_("Start datetime"), interface.start_date),
70
- ]
71
- package_info = [
72
- (__package_name__, __version__, code_hash),
73
- ]
74
-
75
- for module_name, plugin in installed_plugins.items():
76
- package_info.append((module_name, plugin.__version__, plugin.code_hash))
63
+ def supported_devices():
64
+ supported_devices_data = {}
65
+ for vendor_product_code, usb_device_info in tools_usb_device.usb_devices.items():
66
+ usb_device_info.update(
67
+ {
68
+ "vendor_id": vendor_product_code[0],
69
+ "product_id": vendor_product_code[1],
70
+ }
71
+ )
72
+ if usb_device_info["driver_function"] not in supported_devices_data:
73
+ supported_devices_data[usb_device_info["driver_function"]] = []
74
+ supported_devices_data[usb_device_info["driver_function"]].append(
75
+ usb_device_info
76
+ )
77
77
 
78
78
  return render_template(
79
- "application.html.jinja",
80
- application_info=application_info,
81
- package_info=package_info,
79
+ "supported_devices.html.jinja",
80
+ interface=interface,
81
+ supported_devices_data=supported_devices_data,
82
82
  )
83
83
 
84
84
 
@@ -113,6 +113,30 @@ def system():
113
113
  return render_template("system.html.jinja", system_info=system_info)
114
114
 
115
115
 
116
+ @app.route("/application.html")
117
+ @logger.catch
118
+ def application():
119
+ # Lazy import, to avoid circular import problem
120
+ from .. import __package_name__, __version__, code_hash
121
+ from ..tools.tools_plugins import installed_plugins
122
+
123
+ application_info = [
124
+ (_("Start datetime"), interface.start_date),
125
+ ]
126
+ package_info = [
127
+ (__package_name__, __version__, code_hash),
128
+ ]
129
+
130
+ for module_name, plugin in installed_plugins.items():
131
+ package_info.append((module_name, plugin.__version__, plugin.code_hash))
132
+
133
+ return render_template(
134
+ "application.html.jinja",
135
+ application_info=application_info,
136
+ package_info=package_info,
137
+ )
138
+
139
+
116
140
  # ##################################################
117
141
  # Images
118
142
  # ##################################################
@@ -37,6 +37,9 @@
37
37
  <li class="nav-item">
38
38
  <a class="nav-link {%if request.endpoint == 'usb_core_devices' %}active{% endif %}" href="/usb_core_devices.html">{{_('USB Devices')}}</a>
39
39
  </li>
40
+ <li class="nav-item">
41
+ <a class="nav-link {%if request.endpoint == 'supported_devices' %}active{% endif %}" href="/supported_devices.html">{{_('Supported Devices')}}</a>
42
+ </li>
40
43
  <li class="nav-item">
41
44
  <a class="nav-link {%if request.endpoint == 'system' %}active{% endif %}" href="/system.html">{{_('System')}}</a>
42
45
  </li>
@@ -0,0 +1,45 @@
1
+ <!DOCTYPE html>
2
+
3
+ {% extends "layout.html.jinja" %}
4
+
5
+ {%block content %}
6
+
7
+ {% for driver_function, devices in supported_devices_data.items() %}
8
+
9
+ {% set driver = interface.drivers.get(driver_function) %}
10
+
11
+
12
+ <h1>{{ driver.name }} </h1>
13
+ <div class="container-fluid">
14
+ <div class="row">
15
+
16
+ {% for device in devices %}
17
+
18
+ <div class="col-lg-4 p-1">
19
+ <div class="card">
20
+ <div class="card-body">
21
+ <div class="card-text">
22
+ <div class="row">
23
+ <div class="col-6">
24
+ <h5 class="card-title">{{device.name}}</h5>
25
+ </div>
26
+ <div class="col-6">
27
+ <a href="{{url_for('device_image', vendor_id=device.vendor_id, product_id=device.product_id)}}" target="_blank">
28
+ <img class="container-fluid" src="{{url_for('device_image', vendor_id=device.vendor_id, product_id=device.product_id)}}"
29
+ style="max-height: 150px;max-width: 150px;" />
30
+ </a>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+
38
+
39
+ {% endfor %}
40
+ </div>
41
+ </div>
42
+
43
+ {% endfor %}
44
+
45
+ {% endblock %}
@@ -34,8 +34,8 @@ def load_installed_plugins():
34
34
 
35
35
 
36
36
  def _load_usb_devices_from_plugin(plugin):
37
- logger.info(f"Adding {len(plugin.usb_devices.USB_DEVICES)} compatible devices.")
38
- for _vendor_product_code, _device_info in plugin.usb_devices.USB_DEVICES.items():
37
+ logger.info(f"Adding {len(plugin.USB_DEVICES)} compatible devices.")
38
+ for _vendor_product_code, _device_info in plugin.USB_DEVICES.items():
39
39
  usb_devices[_vendor_product_code] = _device_info
40
40
  usb_devices[_vendor_product_code].update(
41
41
  {
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "odoo-driver"
3
- version = "2.2.2"
3
+ version = "2.4.0"
4
4
  description = """
5
5
  Python library to communicates with devices used by Odoo.\
6
6
  (Mainly Point of Sale application)\
File without changes