odoo-addon-web-widget-remote-measure 15.0.1.1.0.2__py3-none-any.whl → 15.0.1.1.2__py3-none-any.whl

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.
@@ -1,3 +1,7 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
1
5
  ============================
2
6
  Remote Measure Devices Input
3
7
  ============================
@@ -7,13 +11,13 @@ Remote Measure Devices Input
7
11
  !! This file is generated by oca-gen-addon-readme !!
8
12
  !! changes will be overwritten. !!
9
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:e90b90010e6a00f6e63bc471ba0342f0ed21608944d223276fffcf69e5e102d6
14
+ !! source digest: sha256:2b1bcd96a246f155a5a2f66e66509d1b0deb36f82c4e2a998eba51d95a786b96
11
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
16
 
13
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14
18
  :target: https://odoo-community.org/page/development-status
15
19
  :alt: Beta
16
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
17
21
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18
22
  :alt: License: AGPL-3
19
23
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--weighing-lightgray.png?logo=github
@@ -3,7 +3,7 @@
3
3
  {
4
4
  "name": "Remote Measure Devices Input",
5
5
  "summary": "Allows to connect to remote devices to record measures",
6
- "version": "15.0.1.1.0",
6
+ "version": "15.0.1.1.2",
7
7
  "author": "Tecnativa, Odoo Community Association (OCA)",
8
8
  "website": "https://github.com/OCA/stock-weighing",
9
9
  "maintainers": ["chienandalu"],
@@ -1,5 +1,6 @@
1
1
  # Copyright 2023 Tecnativa - David Vidal
2
- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2
+ # Copyright 2025 Tecnativa - Sergio Teruel
3
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
4
  from odoo import fields, models
4
5
 
5
6
 
@@ -15,3 +16,14 @@ class ResUsers(models.Model):
15
16
  return {
16
17
  "type": "ir.actions.act_window_close",
17
18
  }
19
+
20
+ # Allow users without setting security group read and write the remote device
21
+ @property
22
+ def SELF_READABLE_FIELDS(self):
23
+ return super().SELF_READABLE_FIELDS + ["remote_measure_device_id"]
24
+
25
+ @property
26
+ def SELF_WRITEABLE_FIELDS(self):
27
+ return super().SELF_WRITEABLE_FIELDS + [
28
+ "remote_measure_device_id",
29
+ ]
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
- <title>Remote Measure Devices Input</title>
6
+ <title>README.rst</title>
7
7
  <style type="text/css">
8
8
 
9
9
  /*
@@ -360,16 +360,21 @@ ul.auto-toc {
360
360
  </style>
361
361
  </head>
362
362
  <body>
363
- <div class="document" id="remote-measure-devices-input">
364
- <h1 class="title">Remote Measure Devices Input</h1>
363
+ <div class="document">
365
364
 
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="remote-measure-devices-input">
370
+ <h1>Remote Measure Devices Input</h1>
366
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
372
  !! This file is generated by oca-gen-addon-readme !!
368
373
  !! changes will be overwritten. !!
369
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:e90b90010e6a00f6e63bc471ba0342f0ed21608944d223276fffcf69e5e102d6
375
+ !! source digest: sha256:2b1bcd96a246f155a5a2f66e66509d1b0deb36f82c4e2a998eba51d95a786b96
371
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
- <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-weighing/tree/15.0/web_widget_remote_measure"><img alt="OCA/stock-weighing" src="https://img.shields.io/badge/github-OCA%2Fstock--weighing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-weighing-15-0/stock-weighing-15-0-web_widget_remote_measure"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-weighing&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-weighing/tree/15.0/web_widget_remote_measure"><img alt="OCA/stock-weighing" src="https://img.shields.io/badge/github-OCA%2Fstock--weighing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-weighing-15-0/stock-weighing-15-0-web_widget_remote_measure"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-weighing&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
378
  <p>This module allows to input data from remote devices in your network. Currently, only
374
379
  websockets devices are supported, but it can be extended for any protocol like
375
380
  Webservices.</p>
@@ -390,7 +395,7 @@ Webservices.</p>
390
395
  </ul>
391
396
  </div>
392
397
  <div class="section" id="configuration">
393
- <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
398
+ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
394
399
  <p>To configure your remote devices:</p>
395
400
  <ol class="arabic simple">
396
401
  <li>Go to <em>Settings &gt; Technical &gt; Devices &gt; Remote devices</em></li>
@@ -401,7 +406,7 @@ Webservices.</p>
401
406
  to have the “Show remote device button on navbar” group.</p>
402
407
  </div>
403
408
  <div class="section" id="usage">
404
- <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
409
+ <h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
405
410
  <p>The remote device has to be in the users network so their web clients can reach them.</p>
406
411
  <p>In order to test a device you can:</p>
407
412
  <ol class="arabic simple">
@@ -420,7 +425,7 @@ provide an uom field so records that aren’t in that UoM don’t measure from t
420
425
  balance icon set on the navbar.</p>
421
426
  </div>
422
427
  <div class="section" id="known-issues-roadmap">
423
- <h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
428
+ <h2><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h2>
424
429
  <p>Current support:</p>
425
430
  <ul class="simple">
426
431
  <li>Websockets connection</li>
@@ -434,7 +439,7 @@ balance icon set on the navbar.</p>
434
439
  </ul>
435
440
  </div>
436
441
  <div class="section" id="bug-tracker">
437
- <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
442
+ <h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
438
443
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-weighing/issues">GitHub Issues</a>.
439
444
  In case of trouble, please check there if your issue has already been reported.
440
445
  If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -442,15 +447,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
442
447
  <p>Do not contact contributors directly about support or help with technical issues.</p>
443
448
  </div>
444
449
  <div class="section" id="credits">
445
- <h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
450
+ <h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
446
451
  <div class="section" id="authors">
447
- <h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
452
+ <h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
448
453
  <ul class="simple">
449
454
  <li>Tecnativa</li>
450
455
  </ul>
451
456
  </div>
452
457
  <div class="section" id="contributors">
453
- <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
458
+ <h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
454
459
  <ul class="simple">
455
460
  <li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
456
461
  <li>David Vidal</li>
@@ -461,7 +466,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
461
466
  </ul>
462
467
  </div>
463
468
  <div class="section" id="maintainers">
464
- <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
469
+ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
465
470
  <p>This module is maintained by the OCA.</p>
466
471
  <a class="reference external image-reference" href="https://odoo-community.org">
467
472
  <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -476,5 +481,6 @@ promote its widespread use.</p>
476
481
  </div>
477
482
  </div>
478
483
  </div>
484
+ </div>
479
485
  </body>
480
486
  </html>
@@ -183,6 +183,7 @@ export const RemoteMeasureMixin = {
183
183
  }
184
184
  this.$input.val(this.amount.toLocaleString(this.locale_code));
185
185
  this._setValue(this.$input.val());
186
+ this.$input.select();
186
187
  },
187
188
  /**
188
189
  * Procure to close the socket whenever the widget stops being used
@@ -323,6 +324,34 @@ export const RemoteMeasureMixin = {
323
324
  },
324
325
  };
325
326
 
327
+ /**
328
+ * Attempts to select the given input element once it becomes visible.
329
+ *
330
+ * This function is necessary because, in Odoo's dynamic widget system,
331
+ * form fields and inputs may be present in the DOM but not yet visible on the screen
332
+ * due to asynchronous rendering, animations, or tab switching.
333
+ * Calling .select() on an element that is not yet visible
334
+ * will not reliably place the cursor or select the text as expected.
335
+ *
336
+ * This helper repeatedly checks whether the input is visible,
337
+ * and when it is, it selects the entire content.
338
+ * It retries up to a maximum number of times (by default, 10),
339
+ * with a short delay between each attempt, to ensure robust user experience
340
+ * even in complex UI flows.
341
+ *
342
+ * @param {jQuery} $input - The jQuery input element to select.
343
+ * @param {Number} retries - Number of retries before giving up (default: 10).
344
+ */
345
+ export function selectInputWhenVisible($input, retries = 10) {
346
+ if ($input.is(":visible")) {
347
+ $input.select();
348
+ } else if (retries > 0) {
349
+ setTimeout(() => {
350
+ selectInputWhenVisible($input, retries - 1);
351
+ }, 50);
352
+ }
353
+ }
354
+
326
355
  export const RemoteMeasure = FieldFloat.extend(RemoteMeasureMixin, {
327
356
  description: _lt("Remote Measure"),
328
357
  className: "o_field_remote_device o_field_number",
@@ -436,6 +465,9 @@ export const RemoteMeasure = FieldFloat.extend(RemoteMeasureMixin, {
436
465
  */
437
466
  start() {
438
467
  this._super(...arguments).then(() => {
468
+ setTimeout(() => {
469
+ selectInputWhenVisible(this.$input);
470
+ }, 0);
439
471
  if (this.remote_device_data && this.remote_device_data.instant_read) {
440
472
  this.measure();
441
473
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-web_widget_remote_measure
3
- Version: 15.0.1.1.0.2
3
+ Version: 15.0.1.1.2
4
4
  Summary: Allows to connect to remote devices to record measures
5
5
  Home-page: https://github.com/OCA/stock-weighing
6
6
  Author: Tecnativa, Odoo Community Association (OCA)
@@ -13,6 +13,10 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
13
  Requires-Python: >=3.8
14
14
  Requires-Dist: odoo<15.1dev,>=15.0a
15
15
 
16
+ .. image:: https://odoo-community.org/readme-banner-image
17
+ :target: https://odoo-community.org/get-involved?utm_source=readme
18
+ :alt: Odoo Community Association
19
+
16
20
  ============================
17
21
  Remote Measure Devices Input
18
22
  ============================
@@ -22,13 +26,13 @@ Remote Measure Devices Input
22
26
  !! This file is generated by oca-gen-addon-readme !!
23
27
  !! changes will be overwritten. !!
24
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
- !! source digest: sha256:e90b90010e6a00f6e63bc471ba0342f0ed21608944d223276fffcf69e5e102d6
29
+ !! source digest: sha256:2b1bcd96a246f155a5a2f66e66509d1b0deb36f82c4e2a998eba51d95a786b96
26
30
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
31
 
28
32
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
29
33
  :target: https://odoo-community.org/page/development-status
30
34
  :alt: Beta
31
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
35
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
32
36
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
33
37
  :alt: License: AGPL-3
34
38
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--weighing-lightgray.png?logo=github
@@ -1,13 +1,13 @@
1
- odoo/addons/web_widget_remote_measure/README.rst,sha256=XkGL88YGhwbemju9-3F4UNsxfDQo109d4G2_3TFli5A,4962
1
+ odoo/addons/web_widget_remote_measure/README.rst,sha256=pJU3_s3bDL4fztGcn7Hlmri3-N-jR416XHWdxUX3x3g,5127
2
2
  odoo/addons/web_widget_remote_measure/__init__.py,sha256=jQ-fltIs1ohXt7udDkkJwzh7ckauQW2rbmv1Wtg3SjQ,47
3
- odoo/addons/web_widget_remote_measure/__manifest__.py,sha256=w4x2WLp1ztqs3gOD62UyHB5BUVDfo8DUXakAJIOlINo,935
3
+ odoo/addons/web_widget_remote_measure/__manifest__.py,sha256=Co1OoTiCiUcIOrtsieXuxdFPYtLxcC9T8i84FnQhDJ8,935
4
4
  odoo/addons/web_widget_remote_measure/controllers/__init__.py,sha256=4KFqEP2QHFbPN66eQJMdGsmNz2v7ywWv_FR1pW_kkLk,19
5
5
  odoo/addons/web_widget_remote_measure/controllers/main.py,sha256=Y7-KWYAzJUsFOUXp8pYb6gubSRPjYaMMTK-EwPvf-FM,1596
6
6
  odoo/addons/web_widget_remote_measure/i18n/es.po,sha256=kRExBvXqKLl-OsldqqfXEvO3DsxlhVJsdUEzhTPXwm8,11634
7
7
  odoo/addons/web_widget_remote_measure/i18n/web_widget_remote_measure.pot,sha256=KxGwpx8coIWOz2BxEXZZ3C4wVg2BJJdUDQJVkFbLEAs,10054
8
8
  odoo/addons/web_widget_remote_measure/models/__init__.py,sha256=J_ouBD3wdPWoRA5-ZLkwygexPIblJEq2FymqQkO9ez8,60
9
9
  odoo/addons/web_widget_remote_measure/models/remote_measure_device.py,sha256=btbPQiNQ8Su7pKEOVzMt8hmMWaZDvRJepvijSv9FH3c,2695
10
- odoo/addons/web_widget_remote_measure/models/res_users.py,sha256=EBbwk30Jzd_lFSsUT3ciwfP_lFWlD8kD9uZYVXrTvnk,485
10
+ odoo/addons/web_widget_remote_measure/models/res_users.py,sha256=zMry9ZVmUUq-JCve2y7ZT2rmGbU82TRzoeOfx-O9Edk,888
11
11
  odoo/addons/web_widget_remote_measure/readme/CONFIGURE.rst,sha256=4ZndrZNCFSSTNyNiRbvVUGXBRyUxEHfld7hlmq66iXc,377
12
12
  odoo/addons/web_widget_remote_measure/readme/CONTRIBUTORS.rst,sha256=CsagrKWiP3dFqMxkMX1CjG1YBQmJt5Bc4CtU1UoRK9Q,95
13
13
  odoo/addons/web_widget_remote_measure/readme/DESCRIPTION.rst,sha256=0ZoY5qczzhDfXvpyx5OUOBLsQFHA_dRIwu8qSFeUu1c,241
@@ -16,16 +16,16 @@ odoo/addons/web_widget_remote_measure/readme/USAGE.rst,sha256=z2p53R2-gi5mY3lTvX
16
16
  odoo/addons/web_widget_remote_measure/security/ir.model.access.csv,sha256=3bwXFcGN-56-3-aR-RYGH8G6sVnuYkirAzpY4dDu8IA,426
17
17
  odoo/addons/web_widget_remote_measure/security/security.xml,sha256=1lW2jowKe0fu9fRj-dPZt0-2q70c4VQKxBBHSAzE7L0,264
18
18
  odoo/addons/web_widget_remote_measure/static/description/icon.png,sha256=O9NGHv3egMV4Z7wp_y1yxXS9BmUi7AiGAleQTwMkuRo,9652
19
- odoo/addons/web_widget_remote_measure/static/description/index.html,sha256=1ijKHvVxb-9jm3mef3nm1GE7QTP36hUR3vybeh-izL4,15497
19
+ odoo/addons/web_widget_remote_measure/static/description/index.html,sha256=7kq74tYb4uiIr9hv0-rSpvMKPIK4U20VvHYRjdLk5-8,15706
20
20
  odoo/addons/web_widget_remote_measure/static/src/js/remote_measure_device_kanban_widget.esm.js,sha256=vw2rHAKmv8F7V3AKVydkN01yNW4_b_uhO0O-GgUWlzI,1119
21
- odoo/addons/web_widget_remote_measure/static/src/js/remote_measure_widget.esm.js,sha256=btbxBKiu65prtRhMw6Mqh3jMBnKoY70RAwzltaqqBXw,15431
21
+ odoo/addons/web_widget_remote_measure/static/src/js/remote_measure_widget.esm.js,sha256=jqBGwq32kr0-m_f1eg87YqTq1xUtF1oiRR-MYH8brBw,16690
22
22
  odoo/addons/web_widget_remote_measure/static/src/js/systray_device_selector.esm.js,sha256=GeAoxLPc8u6Kgx7kdb34fWa3il5uyxFnroD5q5hfRi4,1372
23
23
  odoo/addons/web_widget_remote_measure/static/src/scss/remote_measure_widget.scss,sha256=khdgvWe-uCaz6mXOTrO3-3sMhU8AJkCNA-8-EqaHhqM,643
24
24
  odoo/addons/web_widget_remote_measure/static/src/xml/measure_device_status.xml,sha256=ZiDIjjUC_6OmMCt5CuZjivQQ5GbXw9k63eNlYmCez7E,461
25
25
  odoo/addons/web_widget_remote_measure/static/src/xml/systray_device_selector.xml,sha256=LZIlsnhgzCDFnZRtTZc2okAPQC4qoxoe0Khi1oDzU_c,692
26
26
  odoo/addons/web_widget_remote_measure/views/remote_measure_device_views.xml,sha256=pyIEp4WqR9hmfA5fXtsNYb78f5VFpiGVG7fBZxwjkjU,4630
27
27
  odoo/addons/web_widget_remote_measure/views/res_users_views.xml,sha256=QqvjaLWw1eEWJc8nShScpi-OcPeg7QV8OoqVnEOgJWY,2315
28
- odoo_addon_web_widget_remote_measure-15.0.1.1.0.2.dist-info/METADATA,sha256=pSxFLCBuZkcS4qlyLgPa-rZ5XtnyBOHJSF5-VmWEF-I,5518
29
- odoo_addon_web_widget_remote_measure-15.0.1.1.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
30
- odoo_addon_web_widget_remote_measure-15.0.1.1.0.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
31
- odoo_addon_web_widget_remote_measure-15.0.1.1.0.2.dist-info/RECORD,,
28
+ odoo_addon_web_widget_remote_measure-15.0.1.1.2.dist-info/METADATA,sha256=l5JE7lDZk_B7WZqXj4M6ehUqg-TYWHqkkhqKZigTe5g,5681
29
+ odoo_addon_web_widget_remote_measure-15.0.1.1.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
30
+ odoo_addon_web_widget_remote_measure-15.0.1.1.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
31
+ odoo_addon_web_widget_remote_measure-15.0.1.1.2.dist-info/RECORD,,